Forum Discussion
HKosova
6 years agoSmartBear Alumni (Retired)
Is your definition
"swagger": "2.0"
or
"openapi": "3.0.0"
?
"anyOf" was introduced in OpenAPI 3.0 and is not supported in OpenAPI/Swagger 2.0.
- superh2m6 years agoNew Contributor
swagger: "2.0"
:/
It will never be supported in Swagger ?
But why in the github https://github.com/swagger-api/swagger-core it's marked the version 2.0 it's compatible with the version OpenAPI 3.0 ?
- HKosova6 years agoSmartBear Alumni (Retired)
You need Swagger Core 2.x in order to use OpenAPI 3.0 features such as oneOf.
The "swagger": "2.0" and "openapi": "3.0.0" identifiers in an API definition are versions of the OpenAPI Specification, which defines the syntax and keywords you can use. Swagger Core is a library that implements OpenAPI Spec. Please see What Is the Difference Between Swagger and OpenAPI?
Related Content
Recent Discussions
- 6 days ago
- 12 days ago