Top "Openapi" questions

The OpenAPI Specification, originally known as the Swagger Specification, is a specification for machine-readable interface files for describing, producing, consuming, and visualizing RESTful Web services.

How to define a property that can be string or null in OpenAPI (Swagger)?

I have JSON schema file where one of the properties is defined as either string or null: "type":["string", "null"] …

swagger openapi
Why `additionalProperties` is the way to represent Dictionary/Map in Swagger/OpenAPI 2.0

Although I have seen the examples in the OpenAPI spec: type: object additionalProperties: $ref: '#/definitions/ComplexModel' it isn't obvious …

dictionary hash mapping swagger openapi
"discriminator" in polymorphism, OpenAPI 2.0 (Swagger 2.0)

Referencing OpenAPI 2.0, Schema Object, or Swagger 2.0, Schema Object, and the definition of discriminator field as: Adds support for polymorphism. The …

swagger swagger-2.0 swagger-editor openapi swagger-tools
How to define UUID property in JSON Schema and Open API (OAS)

When using JSON Schema and Open API specification (OAS) to document a REST API, how do I define the UUID …

jsonschema openapi
Convert OpenAPI 3.0 to Swagger 2.0

Is there a generator to convert OpenAPI 3.0 to Swagger 2.0? Mashery, an API gateway, requires Swagger 2.0 format on input to open …

openapi openapi-generator mashery
How to define mutually exclusive query parameters in Swagger (OpenAPI)?

I have a series of parameters in Swagger like this "parameters": [ { "name": "username", "description": "Fetch username by username/email", "required": …

swagger openapi
What is Swagger and does it relate to OData?

I am familiar with the Microsoft stack. I am using OData for some of my restful services. Recently I came …

odata swagger swashbuckle openapi
How to annotate a field as deprecated in OpenAPI (Swagger) 2.0?

I have the following schema definition: swagger: '2.0' ... definitions: Service: type: object properties: serviceId: type: string description: Device or …

swagger swagger-2.0 openapi
How do I include subclasses in Swagger API documentation/ OpenAPI specification using Swashbuckle?

I have an Asp.Net web API 5.2 project in c# and generating documentation with Swashbuckle. I have model that contain …

c# api swagger subclassing openapi
How to run swagger-codegen for OpenAPI 3.0.0

looks like official swagger for openapi specification V3 support is near release https://blog.readme.io/an-example-filled-guide-to-swagger-3-2/, and the …

swagger swagger-codegen openapi