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
2
votes
1 answer

ModuleNotFoundError in Connexion

I have an OpenAPI 3.0 specification and I want to use it with Connexion to run a Python service. The relevant part of the API specification is here: paths: /find: post: summary: XXX description: XXX operationId:…
Carsten
  • 1,912
  • 1
  • 28
  • 55
2
votes
0 answers

How to Define Enum as Query Params in OpenAPI Spec

I want to define an enum value in the query string parameter of a function in an OpenAPI specification. Here is an example of how I specify the parameter in my OpenAPI specification (yaml): openapi: 3.0.0 info: description: Vends sodas version:…
Tibberzz
  • 541
  • 1
  • 10
  • 23
2
votes
1 answer

For OpenAPI (swagger-php), how do I auto generate query parameters?

I am writing an OpenAPI spec and trying to generate my possible query parameters automatically (using swagger-php) from the annotations for a request route/path. I know that I can just type out all possible parameter options for each route, but I…
Joey Overby
  • 161
  • 1
  • 2
  • 8
2
votes
2 answers

Openapi generator does not generate @XmlAttribute/@XmlElement annotations

I am fiddling around with openapi at the moment and trying to create an endpoint that consumes a XML file. When creating the models with openapi however it seems all the XML annotations that I'm used to are missing. This is the openapi.yaml I'm…
Tom
  • 3,807
  • 4
  • 33
  • 58
2
votes
2 answers

OpenAPI validating proxy

Let's say I have some OpenAPI (swagger) service description in YAML or JSON. What are HTTP proxy servers, which can validate actual request and response against description?
adontz
  • 1,428
  • 16
  • 36
2
votes
1 answer

OpenAPI - generate server code for a changing api?

I am maintaining a Java application where we're constantly adding new features (changes in the api). I want to move towards using OpenAPI as a way to document the api. I see two schools of thought: Write the code, use some annotations to generate…
stupot
  • 81
  • 1
  • 4
2
votes
2 answers

API Platform and custom POST operation with custom body

I hope I'm right to ask this. I've looked at (almost) all similar concern but I ain't satisfied yet. I'm working on a User entity and for days (weeks actually) now i'm trying to POST a user with a custom body. Here's some part of my entity User :…
Duhamel
  • 147
  • 1
  • 3
  • 16
2
votes
1 answer

How to generate a Python Flask server with OpenAPI Generator that references my own implementation of *_controller.py?

I want to generate a Python Flask server providing a certain OpenAPI spec as input - let's say foo.yaml - running the following command: java -jar openapi-generator-cli.jar generate -i foo.yaml -g python-flask -o python-flask_api_server However,…
Patrick S.
  • 61
  • 2
  • 9
2
votes
0 answers

Can you compose swagger definitions from multiple $refs?

Hopefully this question holds together. I am building a swagger spec and I want to be able to not only re-use definitions wholesale (i.e. what $ref does), but build those definitions out of even simpler references. For example, say I want to…
Xedni
  • 3,662
  • 2
  • 16
  • 27
2
votes
1 answer

Is ReST (HTTP) relevant for broadcasting data to many client application

I am currently working on a project made of many microservices that will asynchronously broadcast data to many possible client applications. Additionally, client applications will be able to communicate with the system (i.e. the set of…
2
votes
1 answer

Is is possible to specify default request/response format at a root level in OpenAPI 3.0?

In Swagger 2.0 there was a possibility to describe a default response and request content type on a root level: produces: - application/json The only way in OpenAPI 3.0 I have found is to describe it per request/response: responses: …
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
2
votes
1 answer

Is it possible to enable a form for entering bearer tokens in Swagger-UI from ServiceStack's OpenApiFeature?

Is it possible to enable a form for entering bearer tokens in Swagger-UI from ServiceStack's OpenApiFeature? This is possible in NSwag with their Swagger 2.0 implementation.
yenta
  • 1,332
  • 2
  • 11
  • 25
2
votes
1 answer

Is it possible to generate ServiceStack DTOs from an OpenApi specification?

I have a 3rd party API I need to use and it provides an Open API specification. Is it possible to generate ServiceStack DTOs from the specification for use with the standard JsonServiceClient or JsonHttpClient?
yenta
  • 1,332
  • 2
  • 11
  • 25
2
votes
1 answer

Micronaut: Authentication Principal generated into request body

I'm trying to generate client code with swagger-codegen from a Micronaut server. The problem arises with authenticated POST and PUT routes (it works fine for GET an DELETE). When I have a method like this in a controller: @Override @Post("/") public…
Robert Sjödahl
  • 734
  • 5
  • 19
2
votes
1 answer

How to note a calculated default value in OAS3

I'm updating my API spec (OAS 3.0.0), and am having trouble understanding how to properly model a "complex" default value. In general, default values for parameters are scalar values (i.e. the field offset has a default value of 0). But in the API…
kmbenitez
  • 33
  • 5
1 2 3
99
100