Questions tagged [swaggerhub]

SwaggerHub is an API development and documentation platform.

swaggerhub
Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

Validating datetime param in swaggerhub API

I'm encountering an issue with date-time format validation in my API responses, and I'm seeking guidance on resolving it. Problem: I have an API that returns date-time values in the "YYYY-MM-...
user23353322's user avatar
1 vote
0 answers
74 views

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 ...
Vladimir Cravero's user avatar
1 vote
0 answers
717 views

How to automatically update API documentation in SwaggerHub?

I'm using .NET Core app and want to automatically generate OpenAPI documentation in SwaggerHub whenever I push code to a branch in GitHub, so that I can share it across teams. Manually I can run the ...
Srikanth's user avatar
1 vote
1 answer
62 views

Adding narrative documentation to OpenAPI specification [closed]

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 ...
Kundan Saini's user avatar
0 votes
1 answer
764 views

How to fix the "duplicate mapping key" error in the SwaggerHub editor?

When I paste my OpenAPI definition into the SwaggerHub editor, it shows the "duplicate mapping key" error. If I add some spaces, then an indentation error is shown. How to fix these errors? ...
Muhammad Arif's user avatar
0 votes
0 answers
67 views

How to access the application in azure managed kubernetes service

I am very new in a kubernetes world and learning things. I have some situation where i have installed a application(SwaggerHub) in a azure kubernetes service. I follow the installation instructions ...
user565's user avatar
  • 980
2 votes
1 answer
216 views

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 ...
simecek's user avatar
  • 33
1 vote
2 answers
201 views

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 ...
Luca P.'s user avatar
  • 1,041
0 votes
1 answer
144 views

Swagger (hub) how to write certain type

I'm on the swaggerhub website and i need to do an API documentation. I'm trying to define an object with multiple elements, most of which are basic, but one of the properties is another object, NOT ...
alex4482's user avatar
1 vote
1 answer
1k views

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 ...
Jesse Merhi's user avatar
0 votes
1 answer
134 views

API Documentation using XML Comments in SwaggerHub

I am trying to update API documentation for REST APIs. Currently, I have a C# Asp.net Web API code and Swashbuckle.AspNetCore. I am editing and adding XML comments in C# using Visual Studio to update ...
GayathriS's user avatar
0 votes
1 answer
385 views

How do I include my Swagger Hub API definition in a project deployed on Heroku?

I have written the logic for a backend e-commerce REST API, and I have documented it here: https://app.swaggerhub.com/apis-docs/chris-larham-1983/e-Commerce_Registration_Customers_Addresses_Orders/0.1#...
Chris Larham's user avatar
1 vote
1 answer
254 views

Add an API to a specific project inside a SwaggerHub organisation

It's easy to upload an API to an organisation via SwaggerHub CLI: swaggerhub api:create OWNER/API_NAME/[VERSION] But I need to upload an API under some project inside an organisation. In all examples ...
Bohdan Kaminskyi's user avatar
0 votes
0 answers
313 views

Fail while publishing API to swaggerhub

As part of our CI we publish API to swaggerhub via swaggerhub-cli using swaggerhub api:publish. We have several microservices and for some of them it works fine and we can see the log like Published ...
Максим Лисенко's user avatar
0 votes
1 answer
5k views

Why does SwaggerHub return error 403 when I test my OpenAPI definition?

I have the following OpenAPI definition hosted on SwaggerHub: https://app.swaggerhub.com/apis/MyFirstAPI/1.0.1-oas3 openapi: 3.0.0 servers: - url: http://api.myfirstapi.com/ info: version: 1.0.1-...
user avatar
0 votes
1 answer
305 views

Swaggerhub returns predefined response, but server stub doesn't

I have API yaml specification that defines what should be the response from each endpoint, e.g. I want that /version returns version1.0 as defined: openapi: "3.0.3" info: title: "...
sassassins's user avatar
2 votes
0 answers
133 views

How to add AWS Auth to open api spec?

I am writing API specs for a service that requires AWS auth. But I can't find any information as to how to add this authentication in the specs. ( What I did find was this: https://support.smartbear....
Aditya Kumar Gupta's user avatar
1 vote
1 answer
197 views

SwaggerHub mock always returns the same id - is this expected?

I created a very simple OpenAPI docs as I have just started learning about it. This is the link: https://app.swaggerhub.com/apis-docs/srki.coric/Shopping_Cart/1.0.0 There is a mock server however, my ...
SrdjaNo1's user avatar
  • 819
0 votes
1 answer
287 views

JWT token is not working for AWS API gateway

We have around 10 .net microservices hosted on EC2,all the services are authorized using JWT token, each microservice is hosted on one port like 35.xx.xx.xx:8080 , 35.xx.xx.xx:8081 and so on. now I ...
DJ Reddy's user avatar
0 votes
1 answer
404 views

How does one refer to an API on Swaggerhub within another API?

When referencing a domain, you would use the following to get the CommonSchema model from the CommonDomain domain $ref: 'https://api.swaggerhub.com/domains/CompanyName/CommonDomain/1.0.0#/components/...
jdonn95's user avatar
  • 56
1 vote
1 answer
459 views

Swagger hub return 504 when api is tried

The application I am documenting is accessible on a VPN, I defined the api on swagger-hub, and added the server url. But when I try to execute it, swagger-hub returns 504, My understanding is because ...
Vikash's user avatar
  • 2,095
0 votes
1 answer
818 views

Swagger JSON - How could I fix a response render error?

I have been trying to fix an error where the Swagger would not render my JSON response - here is an attached picture of it. The console does not show any errors so I am struggling to allocate from ...
Chefoy12's user avatar
1 vote
0 answers
149 views

How to Generate Java Pojo from Swaggerhub Api during Gradle build?

My application publishes data to an application owned by another person. The model for the object is owned by that other person but they provide an API hosted in Swaggerhub for that same model. I want ...
Tommy Pickles's user avatar
-3 votes
1 answer
129 views

How to Send Lead Form Data to swaggerhub Api using php? [closed]

I have a Swagger API on which, I had to send Lead Form Data From my Web Page. I Can't Get much data From internet. Form is Already Created on Swagger HUB on Which ,I can manually insert data and it's ...
Code Chef's user avatar
0 votes
0 answers
500 views

What does the "Failed to download" error mean when importing an API into SwaggerHub?

I'm trying to import my OpenAPI JSON file, http://...../swagger/v2/swagger.json, into SwaggerHub but the import fails with this error: The "Show Details" link shows: Details: Status: 403 ...
Lina's user avatar
  • 553
1 vote
1 answer
955 views

Swaggerhub integration in spring boot

I am new to swaggerhub so please explain me from basics. In our project we are using springfox swagger and need to generate swaggerhub api specification. How can I achieve this? Please let me know in ...
Rupesh Patil's user avatar
1 vote
1 answer
433 views

API (Spring Boot - SwaggerHub Generated) results with 404, despite being mapped properly

I was using SwaggerHub recently and tried to upgrade the spring-boot version (1.5.22.RELEASE to 2.3.3.RELEASE) in the generated Spring-Boot api, because of the access management (Keycloak). Upgrading ...
Sercan Samet Savran's user avatar
0 votes
1 answer
2k views

How to define an array with a fixed set of valid values? [duplicate]

I'm having trouble defining this field in OpenAPI. I've got a schema with a field that can hold an array of zero or more strings, like this { "daysOfWeek": ["Monday", "...
Michael's user avatar
  • 377
0 votes
2 answers
262 views

How to record api calls to mock in SwaggerHub?

I want to mock api calls from my application, and host the mock, so my tests can work without calls to real api. There is a service called restbird which does exactly that, but it is far from ideal ...
Simon Moshenko's user avatar
2 votes
0 answers
345 views

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 ...
David's user avatar
  • 1,263
0 votes
1 answer
947 views

How use ref example with another ref example?

I am trying to understand how to nest ref inside a ref.. I have 2 objects, ResponseObject and LastUpdatedAt: ResponseObject: type: object properties: code: type: integer format: ...
JozeRi's user avatar
  • 3,339
0 votes
1 answer
215 views

How to get rid of "API must not have local definitions (i.e. only $refs are allowed)" Swaggerhub standardization error with Springfox

I have swagger api-docs.json definition generated by SpringFox. Below minimal-reproducible-example: { "swagger": "2.0", "info": { "description": "Example REST API.", "version": "15.11.02",...
snieguu's user avatar
  • 2,193
2 votes
0 answers
223 views

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 ...
jdonn95's user avatar
  • 56
1 vote
1 answer
2k views

Integrating Swagger-UI with Angular-8 Application

I want to integrate my Angular8 (8.2.0) Application with Swagger-UI (3.24.0) and I'm getting the below error: _stream_writable.js:57 Uncaught ReferenceError: process is not defined at Object../...
Jayanth's user avatar
  • 111
5 votes
1 answer
5k views

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: <Employees> <Employee> <EmpId>001</EmpId&...
Rabikatha's user avatar
  • 249
0 votes
0 answers
88 views

How can I return the sum of lon and lat (swaggerhub)?

I have written a POST method for the input of 2 integers lon and lat. How can I calculate the sum of lon and lat and return it? openapi: 3.0.0 info: version: '1.0.0' title: '' description: '' ...
AlexM88's user avatar
6 votes
4 answers
6k views

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 ...
phonemyatt's user avatar
  • 1,317
1 vote
1 answer
628 views

SwaggerHub's generated spring boot server stub gives 404's when ran

I created a sample OpenAPI spec using SwaggerHub: https://app.swaggerhub.com/apis/Leejjon/Example/1.0.0 Then I generate a server stub via Export -> Server Stub -> Spring (you can do the same via the ...
Leejjon's user avatar
  • 730
0 votes
1 answer
393 views

Create hashmap using swaggerhub

My requirement is to create a dynamic set of fields so that they can be contained in a hashmap for further process of restful request. As suggested in link : MyBean: type: object ...
Raghuveer's user avatar
  • 3,019
10 votes
1 answer
7k views

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:...
DanFlorin's user avatar
  • 131
2 votes
1 answer
3k views

Reference multiple schema in a single schema

In swaggerhub I am trying to build a restful API. For which I have created n number of POJOs for request. I would like to represent them as references in other POJO example: ClientInformation: ...
Raghuveer's user avatar
  • 3,019
0 votes
0 answers
464 views

SwaggerHub error 500 during update API definitions

I tried to update my API's swagger definition on SwaggerHub mock server. For test i download swagger file from https://petstore.swagger.io/v2/swagger.json. And try to send POST request to swaggerhub....
T_E_M_A's user avatar
  • 580
1 vote
1 answer
3k views

Referencing remote 'response's and 'parameter's on $ref open api 3.0

I am creating a well-organized OAS3 swagger documentation on swaggerhub. For every endpoint i am writing all possible answers like 200, 201, 204, 400, 401, 403, 404, 500 etc. In addition all methods ...
darcane's user avatar
  • 483
2 votes
2 answers
883 views

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 ...
Omelian Levkovych's user avatar
1 vote
1 answer
2k views

How to define headers in a swagger domain

I'm trying to define some reusable elements in a SwaggerHub domain but can't figure out how to define headers. I've tried a few things but they all produce errors, such as: $refs cannot match any of ...
batwad's user avatar
  • 3,628
3 votes
1 answer
1k views

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 ...
Tagamoga's user avatar
  • 350
7 votes
1 answer
2k views

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 ...
Ludo's user avatar
  • 5,140
4 votes
2 answers
4k views

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 ...
Mark Hayward's user avatar
2 votes
1 answer
955 views

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 ...
Stan Reduta's user avatar
  • 3,402
-1 votes
1 answer
2k views

How to import an existing OpenAPI definition to SwaggerHub?

Is there a way to import an existing OpenAPI (Swagger) definition to SwaggerHub by providing a link to the corresponding Swagger UI page? I tried importing the WEBLOC file link that I have, but ...
user9564670's user avatar