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

Why do I get an OutOfMemoryError when load-testing a Swagger-Webservice

We have developed a MicroService which is accessed by a secondary system. Both systems use a Swagger/OpenApi API to communicate with one-another. We generate the client as "java" (underlying okhttp-Client). When we are load-testing the system after…
Jonathan
  • 2,698
  • 24
  • 37
2
votes
1 answer

How to use $ref for tags between files

I am using Open API 3.0, in A.yaml # something above tags: - name: user description: Operations about user - name: user_stuff description: API for user stuff - name: another_user_stuff description: API for another user stuff #…
Uvuvwevwevwe
  • 971
  • 14
  • 30
2
votes
2 answers

swagger read documentation from properties file

I am trying to get Swagger to read the API documentation from a properties file swagger.properties but can't. In @ApiOperation annotation there is an error saying: Attribute value must be constant. Any suggestions about how to solve this and be…
m.y.m
  • 347
  • 4
  • 27
2
votes
0 answers

Is it possible to have SwaggerHub generate a client sdk models without the '@schema" annotation (java)?

I'm using swaggerHub with openapi 3.0.0. The java client sdk generates its models with an @Schema annotation above each of the getters. @Schema(example = "12.9843215", description = "") public String getLattitude() { return lattitude; } Is…
jdonn95
  • 56
  • 4
2
votes
1 answer

Describe a multiple range parameter with Swagger

I want to describe in Swagger 2.0 a parameter defined as follows : The parameter takes a valid value in the intervals : -20 < parameter < -10 or 0 < parameter < 30 The parameter is invalid if : -10 ≤ parameter ≤ 0 This means that it has two valid…
Sara Sara
  • 57
  • 1
  • 8
2
votes
1 answer

Sanic OpenAPI Swagger docs generation throws attribute paths operationId is repeated

I am using sanic to build a simple API. I have two end points defined: from sanic import Blueprint, response from sanic_openapi import doc bp = Blueprint('default', url_prefix="", version=2, strict_slashes=True) @bp.get("") @doc.summary('Default…
NewGuy
  • 3,273
  • 7
  • 43
  • 61
2
votes
2 answers

Using Micronaut OpenAPI/Swagger generator with grails 4

We're considering using grails 4.0.0 for our project, and i see that this new version has Micronaut as new parent application context, and that many Micronaut features are handled (seen in grails doc:…
ztwal
  • 21
  • 2
2
votes
1 answer

Is it possible to set response Content-Type based on response HTTP code in ASP.NET Core (Swashbucle)?

I'm currently working this on ASP.NET Core 3.0 using Swashbuckle.AspNetCore, but I would like to know the case for OpenAPI 3.0 Specification in case anyone else knows better. I try currently set the specification with Nuget library so that normally…
Veksi
  • 3,556
  • 3
  • 30
  • 69
2
votes
2 answers

Is there a way to explictly set nullable : false in OpenApi v3 spec properties?

I'm trying to set a property in the OpenAPI spec to be both required and nullable : false as specified in the C# I'm supplying. I'm using NSwag v13.1.3 and NewtonSoft.Json v12.0.2 along with .Net Core 2.2 I've tried passing in various combinations…
ashbaz
  • 21
  • 1
  • 3
2
votes
0 answers

setup for multiple swagger API files

I am working on a project where we rewrite the interfacing of an existing application, porting everything to swagger/openAPI. Right now, each feature has its own yml file right now, which is a standalone spec. But there are some…
bvdb
  • 22,839
  • 10
  • 110
  • 123
2
votes
3 answers

ParseExact cannot parse a string in RFC 3339 Internet Date/Time format

It seems that C# does not manage to parse a time in a valid RFC 3339 format: DateTime.ParseExact("2019-12-31T00:00:00.123456789+01:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffffzzz", null) This line throws an exception, while this line works just…
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
2
votes
2 answers

Is it possible to use random.number with min and max values in x-faker property for openapi mocking

I have a yaml file like this: type: object properties: transactionId: x-faker: random.uuid description: Transaction internal id type: string description: x-faker: lorem.sentence description: Transaction description type:…
S.Yavari
  • 876
  • 8
  • 25
2
votes
1 answer

How to properly parse out error code from lambda response in openapi api-gateway

I am setting up an endpoint for a lambda in api-gateway using openapi. This lambda will need to be be able to return 400/500 error codes for internal errors/bad requests. To this end I have tried to format the x-amazon-apigateway-integration section…
2
votes
0 answers

Why there is no @FeignClient annotation in feign client template in OpenApi

Straight to the point -> anybody knows why this template file does not have @FeignClient annotation? Problem is we would like to use @EnableFeignClients annotation in our configuration, but seems like without @FeignClient anootations in generated…
Piotr Tempes
  • 1,091
  • 1
  • 12
  • 26
2
votes
1 answer

Openapi/Swagger generation from Typescript code

I am looking for a way to generate OpenAPI/Swagger API definitions from code written in Node.JS/Express.JS/Typescript. Ideally this would be just annotations the I had to my Express Typescript base controllers and this generate the OpenApI/Swagger…
Luis Trigueiros
  • 636
  • 7
  • 21