Questions tagged [openapi]

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.

A variety of tools can generate code, documentation and test cases given an interface file. Development of the OpenAPI Specification (OAS) is overseen by the Open API Initiative, an open source collaborative project of the Linux Foundation.

Ref: https://en.wikipedia.org/wiki/OpenAPI_Specification

Related tags

4284 questions
19
votes
8 answers

Integrating HealthCheck endpoint into swagger (open API) UI on dotnet core

I am using Dotnet Core healthchecks as described here. In short, it looks like this: First, you configure services like this: services.AddHealthChecks() .AddSqlServer("connectionString", name: "SQlServerHealthCheck") ... // Add multiple…
eddyP23
  • 6,420
  • 7
  • 49
  • 87
19
votes
3 answers

OpenAPI query string parameter with list of objects

I am trying to document with OpenAPI a query string which look like filtered[0][id]=code&filtered[0][value]=12345 and contains a list of object with properties id and value. My yaml documentation looks like the following parameters: - name:…
marcosh
  • 8,780
  • 5
  • 44
  • 74
19
votes
2 answers

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-codegen has 3.0.0 support developed and passing some level of testing…
some bits flipped
  • 2,592
  • 4
  • 27
  • 42
19
votes
4 answers

Django REST Framework Swagger 2.0

Having a hard time configuring Swagger UI Here are the very explanatory docs: https://django-rest-swagger.readthedocs.io/en/latest/ YAML docstrings are deprecated. Does somebody know how to configure Swagger UI from within the python code? or what…
19
votes
2 answers

How to group multiple parameters in Swagger 2.0?

Is it possible to group multiple parameters to reference them in multiple routes? For example I have a combination of parameters which I need in every route. They are defined as global parameters. How can I group them? I think about a definition…
cansik
  • 1,924
  • 4
  • 19
  • 39
18
votes
2 answers

OpenAPI vs JSON:API

I couldn't find any resources on the use case differences between JSON:API & OpenAPI From my understanding, JSON:API is more focused on the business data while OpenAPI is more about REST itself? Any pointers would be great, thanks!
Webber
  • 941
  • 11
  • 26
18
votes
1 answer

FastAPI - ENUM type models not populated

Below is my fastAPI code from typing import Optional, Set from fastapi import FastAPI from pydantic import BaseModel, HttpUrl, Field from enum import Enum app = FastAPI() class Status(Enum): RECEIVED = 'RECEIVED' CREATED = 'CREATED' …
VamsiKrishna
  • 751
  • 6
  • 14
  • 29
18
votes
5 answers

petstore URL not disabled in SpringDoc OpenAPi

I am using SpringDoc 1.4.3 for swagger. I have added the below configuration to disabled the petstore URLs in application.yml Configuration springdoc: swagger-ui: disable-swagger-default-url: true tags-sorter: alpha operations-sorter:…
SSK
  • 3,444
  • 6
  • 32
  • 59
18
votes
3 answers

How to update resources with patch method using OpenAPI correctly?

I am learning OpenAPI recently, and would like to know the best practices. Let's say I have a resource called Person, and it is defined in components/schemas as follows: Person: type: object required: - id - name - age properties: …
DrizzleX
  • 377
  • 3
  • 11
18
votes
1 answer

Python Flask automatically generated Swagger/OpenAPI 3.0

Im trying to generate swagger document for my existing Flask app, I tried with Flask-RESTPlus initially and found out the project is abundant now and checked at the forked project flask-restx https://github.com/python-restx/flask-restx but still i…
DonOfDen
  • 3,968
  • 11
  • 62
  • 112
18
votes
1 answer

Enable Authorize button in springdoc-openapi-ui for Basic Authentication

How to enable "Authorize" button in springdoc-openapi-ui (OpenAPI 3.0 /swagger-ui.html) for Basic Authentication. What annotations have to be added to Spring @Controller and @Configuration classes?
Eugene Khyst
  • 9,236
  • 7
  • 38
  • 65
18
votes
5 answers

What is the function of springdoc-openapi-maven-plugin configuration/apiDocsUrl?

I'm running the springdoc-openapi-maven-plugin, with the following (standard) configuration: org.springdoc springdoc-openapi-maven-plugin
KevinB
  • 1,102
  • 2
  • 8
  • 19
18
votes
3 answers

Generating swagger docs from typescript interfaces

I'm using swager-jsdoc to document all the DTOs of the app. I was wondering is there any way to generate the swagger docs automatically from typescript interfaces. I have a lot of them in the project and also a lot of mongoose schemas and models. It…
Adrian Moisa
  • 3,923
  • 7
  • 41
  • 66
18
votes
3 answers

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 cannot address: Schema error at paths['/projects/{projectId}/user'].post should NOT have additional properties additionalProperty:…
ilomax
  • 568
  • 1
  • 4
  • 24
18
votes
1 answer

How can I denote decimal floating point in swagger specs?

I would like to denote decimal with 2 places and decimal with 1 place in my api documentation. I'm using swagger 2.0, Is there inbuilt defined type or any other 'round' parameter in the specs, or my only option is to use 'x-' extension?
runkar
  • 456
  • 1
  • 4
  • 15