Mar 10, 2021 · and the discriminator and mapping can only be found under components of the base type. I assume this is an intentional change? I can see the point of not repeating the discriminator mappings repeatedly, but it seems rather cumbersome to find the discriminator and mapping with the new structure (basically find the common allOf() parent of all the types referenced in oneOf I think?
Discriminator. To help API consumers detect the object type, you can add the discriminator/propertyName keyword to model definitions. This keyword points to the ...
to generate oneOf & discriminator information but they're interpreted as unions (at least by openapi-generator) which might not be wanted. Additionally openapi-generator currently has some issues with union generation which prevents us from using oneOf anyway.. TL;DR My question is whether allOf can already be used with discriminator and I just haven't found the …
10.03.2021 · and the discriminator and mapping can only be found under components of the base type. I assume this is an intentional change? I can see the point of not repeating the discriminator mappings repeatedly, but it seems rather cumbersome to find the discriminator and mapping with the new structure (basically find the common allOf() parent of all the types …
In fact openapi-generator has dropped support for allOf inheritance without a discriminator. It's stopped generating any inheritance information (e.g. no extends in typescript) if the discriminator is missing. As far as I can see Swashbuckle only adds discriminator information when using oneOf for inheritance.
@PaoloVigori: I used that on Swashbuckle.AspNetCore, the PolymorphismDocumentFilter is called and discriminator is set in the code, but not in the generated ...
15.11.2021 · Discriminator options. Swashbuckle does not consider interfaces as "parent" types. What if we make it "think" it's still dealing with a class and not an interface? Let's introduce PaymentResponseAction class: [DataContract] [SwaggerDiscriminator("type")] ...
Aug 05, 2018 · I am using Swashbuckle v3.0. I am not sure weather this is a bug or not, but polymorphism is not working as it should. I have the following classes: BasePersonDocumentDto { Id, Number }
Aug 04, 2018 · With #1041, we now have basic support, but without a way to tell Swashbuckle what property is the discriminator, nor what is the discriminatorMap, this is somewhat useless. Sure, it can easily be generated using a custom SchemaFilter, but wouldn't it be easier to have an annotation on the property take care of that?
type: object title: Gas-powered Vehicle properties: vehicleType: description: The type of vehicle. anyOf with title. When to use the Swagger discriminator.
Refer to the routing documentation for more information.. Components. Swashbuckle consists of multiple components that can be used together or individually depending on your needs. At its core, there's a Swagger generator, middleware to expose it as JSON endpoints, and a packaged version of the swagger-ui.These 3 packages can be installed with the …
02.02.2010 · Swashbuckle 5.0. Swashbuckle 5.0 makes the transition to Swagger 2.0. The 2.0 schema is significantly different to its predecessor (1.2) and, as a result, the Swashbuckle config interface has undergone yet another overhaul. Checkout the transition guide if you're upgrading from a prior version. Getting Started
The swagger:allOf annotation can be followed by a string. This string will be the value for the x-class vendor extension. This value is used as constant for the ...
04.08.2018 · With #1041, we now have basic support, but without a way to tell Swashbuckle what property is the discriminator, nor what is the discriminatorMap, this is somewhat useless.. Sure, it can easily be generated using a custom SchemaFilter, but wouldn't it be easier to have an annotation on the property take care of that?
Nov 25, 2021 · Swashbuckle.AspNetCore. Swagger tooling for APIs built with ASP.NET Core. Generate beautiful API documentation, including a UI to explore and test operations, directly from your routes, controllers and models. In addition to its Swagger 2.0 and OpenAPI 3.0 generator, Swashbuckle also provides an embedded version of the awesome swagger-ui that's ...