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 describe this POST JSON request body in OpenAPI (Swagger)?

I have a POST request that uses the following JSON request body. How can I describe this request body using …

swagger swagger-2.0 openapi
How to define an enum in OpenAPI (Swagger)?

Does anyone know how to define possible 'enum' values in an OpenAPI 2.0 definition so that they will be displayed in …

swagger swagger-ui swagger-2.0 openapi
Post a json body with swagger

I would like to POST a json body with Swagger, like this : curl -H "Content-Type: application/json" -X POST -d {"…

json rest api swagger openapi
How to post files in Swagger (OpenAPI)?

I am using Swagger to document my REST services. One of my services requires a CSV file to be uploaded. …

swagger swagger-ui openapi
What is the correct way to declare a date in an OpenAPI / Swagger-file?

What is the correct way to declare a date in a swagger-file object? I would think it is: startDate: type: …

swagger openapi
Swagger/OpenAPI mock server

I have an API reference in a Swagger file. I want to create a very simple mock server, so that …

mocking swagger swagger-2.0 openapi
How to specify if a field is optional or required in OpenAPI/Swagger?

How to I define in OpenAPI/Swagger if a field is optional or required and what is the default?

swagger openapi
Swagger/OpenAPI - use $ref to pass a reusable defined parameter

Let's say I've got a parameter like limit. This one gets used all over the place and it's a pain …

swagger swagger-2.0 openapi
Swagger Codegen (with maven plugin) for OpenAPI 3.0

I want to use Swagger Codegen for OpenAPI 3.0 YAML file. And I see Swagger Codegen 3.0.0-rc0 is available. But when …

maven swagger swagger-codegen openapi openapi-generator
SwaggerUI/YAML - should NOT have additional properties additionalProperty: requestBody

Designing an API using editor.swagger.io I find myself unable to add a requestBody attribute, getting an error I …

swagger swagger-ui swagger-2.0 openapi