Skip to content

SwaggerODataSample throws Exception when accessing V1, V2 and V3 #729

Closed
@andenkondor

Description

@andenkondor

Hi,

I'm currently on v5.0.0 and can't access the swagger docs for every version greater than 0.9.
Here is what the log is telling me:

Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate Operation for action - Microsoft.Examples.V1.OrdersController.Post (SwaggerODataSample). See inner exception ---> Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate schema for type - Microsoft.Examples.Models.Order. See inner exception ---> System.InvalidOperationException: Can't use schemaId "$Order" for type "$Microsoft.Examples.Models.Order". The same schemaId is already used for type "$Microsoft.Examples.Models.Order" at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.RegisterType(Type type, String schemaId)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions