Comments (1)
Both OpenAPI 2.0 and 3+ specs only support one response type per status code (ref). In 3+ I think you could use oneOf
to describe this, which would be relatively easy to implement. In 2.0 you'd need to use a combination of allOf
and discriminator
, which is more complicated, because discriminator
comes with some restrictions:
The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the
required
property list. When used, the value MUST be the name of this schema or any schema that inherits it.
from swag.
Related Issues (20)
- Generated open api missing schema in path/query parameter HOT 1
- Request: When is the expected release date for v2? HOT 1
- Instalation issue
- Generics support cross package HOT 3
- Issue rendering Swagger UI, Blank page HOT 2
- add pattern or example to string value in a model HOT 1
- Ability to override name of enum variants generated from ordered constants
- Swag generate empty path HOT 1
- swag + kiota need the full path name for component HOT 3
- swagger-ui Parser error on line 13 end of the stream or a document separator is expected HOT 1
- Custom attributes for tags
- Renaming of models HOT 1
- Parenthesis not registering in @Router
- Provide a way to specify an external module to include HOT 1
- Incorrect tab in swag fmt causes godoc display error
- Swagger UI support one-click expand model definition (include field comment) HOT 1
- feat: Allow struct field type to differ from enum type
- Improve operation param parsing
- Swag fails to load type in external package. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swag.