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
0 answers

How to include RegexOptions in OpenAPI json to indicate lower case

I am writing an application that calls an API using code that is generated using autorest. The API has Fluent Validation and writes the expression to the swagger.json document, but the validator behind it uses Regex.IgnoreCase which is not exposed…
jonmeyer
  • 748
  • 8
  • 22
2
votes
0 answers

Spring WebTestClient request and response validation

Based on what has been done by Atlassian to validate a request and response against an OpenAPI specification, I'd like to adapt this logic to WebTestClient. My approach is to configure the WebTestClient with a specific filter, however I cannot find…
Martin
  • 21
  • 2
2
votes
2 answers

how to set one value for few key's in YAML object

As far as I know there is no way to attach few keys to the single value in {key : value} pair in YAML. I am new to Swagger documentation (OpenAPI 3.0) and wondering is it possible somehow to combine my values together. For instance, I am messing…
2
votes
1 answer

Building an OpenAPI response, including oneOf, and maybe allOf

I am trying to build up a response from a variety of schema components using OpenAPI 3. There are basically three parts to the response: A shared component that other endpoints use (i.e. success/failure flags). -…
GIS-Jonathan
  • 4,347
  • 11
  • 31
  • 45
2
votes
0 answers

define common parameters for openapi/swagger annotations

On https://swagger.io/docs/specification/describing-parameters/ (OAS3) there is an example for common parameters which can be refered by $ref in paths and operations: components: parameters: offsetParam: # <-- Arbitrary name for the…
Matthias Wiedemann
  • 1,313
  • 12
  • 22
2
votes
0 answers

How to generate swagger for my API where one property of return type can be polymorphic?

I am trying to generate Swagger JSON for my web api which is developed in c# using Swashbuckle. There is a case where one object property of my return type can be polymorphic based on a string/enum value in containing object (discriminator). When I…
2
votes
0 answers

Can I add method parameters when generating Spring MVC mappings from OpenAPI?

My team is evaluating adopting OpenAPI Generator for our project, and the ability to declaratively keep Spring MVC mappings in sync with the spec is attractive. However, much of Spring MVC's value comes from its ability to automatically resolve…
chrylis -cautiouslyoptimistic-
  • 75,269
  • 21
  • 115
  • 152
2
votes
1 answer

Is it possible to use whole raw string as parameter in swagger

there is a url like http://someservice.com/confirm?{token} Is this any way how to describe this endpoint in terms of swagger notation if use as query parameter then you get /confirm: get: summary: ... parameters: - in:…
Rinat
  • 429
  • 5
  • 14
2
votes
0 answers

support dynamic key with springfox swagger

@ApiOperation(value = "Sample API") @ApiImplicitParams(value = { @ApiImplicitParam(dataType = "string", name = "x",, required = false, paramType = "form", allowMultiple = true), @ApiImplicitParam(dataType = "__file", name =…
fortm
  • 4,066
  • 5
  • 49
  • 79
2
votes
1 answer

swagger-ui - open api 3, multipart/form-data array problem

I'm uising swagger-ui with OpenApi 3.0.2 spec. I set a requestBody with multipart/form-data content. Everithing works fine when I execute the request from swagger-ui but... If I add a parameter of type array, it will be transformed in curl call in…
ggirodda
  • 770
  • 7
  • 19
2
votes
0 answers

Micro Profile Openapi 3.0 document generation at maven build time

Hi am trying to generate API documentation by scanning all openapi annotation which we used in java at maven build time to generate json or YAML rather than generating in Runtime in liberty server.Its working fine with runtime. maven
senthil kumar
  • 237
  • 1
  • 6
  • 18
2
votes
1 answer

How to generate some models for java with OpenApi Generator?

I successfully did generate a REST Client in java from a Swagger/OpenApi v2.0 using OpenApi Generator CLI 3.3.2-SNAPSHOT But I already have a REST Client, so I just want to generate some models from the spec. I get success when I run: java -Dmodels…
Armando
  • 310
  • 5
  • 18
2
votes
3 answers

Testing API with Swagger/OAS

I've spent some time documenting an API with Swagger/OAS 3. I want to validate our current API conforms with the OAS 3 document. How can I do this?
Noodles
  • 900
  • 4
  • 14
  • 30
2
votes
1 answer

Describing a json parameter in Swagger

Issue According to this and this Swagger supports complex parameters, but when I try to describe a json parameter Swagger Editor shows the following issue: Could not render ParameterRow, see the console. Expected behavior Json object as a…
阿尔曼
  • 1,275
  • 2
  • 14
  • 18
2
votes
1 answer

How do I get aiohttp-swagger to recognize GET query variables?

I'd like to use aiohttp-swagger in my python Project but I can't figure out how it handles GET URL and POST payload variables. I have this sample code based on the quick start example here. The only change I made is that I included a query…
user2023861
  • 8,030
  • 9
  • 57
  • 86
1 2 3
99
100