Questions tagged [swaggerhub]

SwaggerHub is an API development and documentation platform.

54 questions
10
votes
1 answer

How to set the Accept header globally in OpenAPI 3.0?

I have a new OpenAPI setup via SwaggerHub. Is there an option to force a certain Accept header globally? I have set up the Content-Type on the response: openapi: 3.0.0 paths: /test-path: get: responses: '200': …
DanFlorin
  • 121
  • 1
  • 8
6
votes
1 answer

Is there an API in SwaggerHub to update the file definition?

Is there an API to update the file definition? I am looking for a way to keep my project in Git and SwaggerHub in sync automatically, so I would like to update the file definition at every merge. Is it possible? How do you manage keeping your…
Ludo
  • 5,060
  • 15
  • 53
  • 85
5
votes
1 answer

How to define an XML array of objects in OpenAPI?

I'm designing an API using OpenAPI 3.0 and SwaggerHub. My API has a GET endpoint that returns an array of employees in XML format: 001 Steven 1-541-754-3010
Rabikatha
  • 249
  • 5
  • 9
5
votes
4 answers

Swagger Codegen For Nestjs

I have created apis endpoint with Swaggerhub and successfully exported to run with asp.net core. I want to test the same apis with nestjs but i found documenting with openapi but not the other way round; convert yaml to nodejs.Is there a way to…
phonemyatt
  • 1,287
  • 17
  • 35
4
votes
2 answers

Authenticate to Cognito from SwaggerHub for calls to API Gateway

I have a SwaggerHub definition and I want to use the 'Try it out' function to pull data from my API Gateway page. This API is restricted using a Cognito Authorizer. Currently I have created a separate web page where I log into my Cognito UserPool…
3
votes
1 answer

How do I refer between different APIs in SwaggerHub?

I am working with SwaggerHub and OpenAPI 3.0.0. I have two APIs in SwaggerHub. The first has got following access link: https://app.swaggerhub.com/apis/myapipath/1.0.0 and contains a definition named components/schemas/ApiOffer. In the second API, I…
Tagamoga
  • 332
  • 4
  • 18
2
votes
1 answer

SwaggerHub mock server with externalValue example

I'm getting 406 Not Acceptable responses when I'm trying to use the externalValue property in an example object on the swaggerhub mocked server. Am I doing something wrong or this feature is not implemented on the swaggerhub mocking server? API…
simecek
  • 23
  • 2
  • 4
2
votes
0 answers

How to extract only the required fields from an OpenAPI schema?

I have an OpenAPI definition in JSON format that I have uploaded to SwaggerHub. The OpenAPI definition has one API method that has a substantial payload. Is it possible, via SwaggerHub or some other tool, to only extract the required fields so I can…
David
  • 1,203
  • 6
  • 25
  • 48
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
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

SwaggerHub mock response returns 201 despite missing fields in POST request

I'm trying to mock a POST request at SwaggerHub based on the following definition: post: summary: "Creates order" description: "" consumes: - application/json parameters: - name: "order" in: body …
Stan Reduta
  • 3,292
  • 5
  • 31
  • 55
1
vote
0 answers

Swagger allOf not respected when using SwaggerHub code generator

I am trying to generate a python SDK for the following API definition: https://api.youneedabudget.com/papi/spec-v1-swagger.json When I load the json on swaggerhub everything seems fine, but the generated python code is missing some fields in the…
1
vote
1 answer

Adding narrative documentation to OpenAPI specification

As a best practice, I wanted to incorporate some important and critical helpful content into my API specifications FAQs related to APIs Code template or cookbook to help the consumer to see the code sample to call the API API subscription…
Kundan Saini
  • 87
  • 2
  • 6
  • 15
1
vote
2 answers

Define OpenAPI domains locally and avoid publishing on SwaggerHub

I'm tinkering with OpenAPI and I would like to make my components definition available in a separate file. I understand that this is achieved through domains created on SwaggerHub. My problem is that I am at the stage when I am still playing around…
Luca P.
  • 1,021
  • 8
  • 20
1
vote
1 answer

How to avoid the "self signed certificate" error when testing requests in SwaggerHub?

I have been recently using SwaggerHub and I keep getting a "self-signed certificate" error, the error code is 500 - internal server error. I'm hosting our API on AWS, and I have inputted the correct host and the endpoints work when I use them…
1
2 3 4