Multiple path params not working
Hi Folks, Recently I have encountered an issue where I have two path parameters for an api endpoint where both are mandatory, but when we execute the api via swagger and pass the value for them, for 1st param its fetching fine but for 2nd one its returning the name of the paramater. Below are the details. For Example: I have passed 2 values for 2 fields named as budget_name and partition_name as budget1 and partition1 but when I logged(print) them, I got budget1 [which is correct] and {partition1} [not correct its treating field name as value].Pre-Request in swagger
I am configuring Swagger in my project using Python Flask. The API which I am invoking from swagger needs the token bearer and that token bearer can be fetched by invoking other API(/GetToken) ( which need basic auth). I need to automate this process when ever user is invoking a API from swagger the swagger should automatically call /GetToken and set the bearer token. (kind of Pre-request script in postman) I tried searching for any solution in swagger documentation by found None.parsing csv columns in enum on json file from flask-python
i have this code in python. as you can see this function returns sensitive_data (column names, column data) and also returns only (columns names). this columns are sensitive columns of an imported csv. I want to parse those sensitive columns in swagger ui json file in enum section i guess (or whatever). i want to parse them to enum because i want the user to select the column he wants from a dropdown menu the column he prefers. how is this possible? can you provide me a possible json code for this? i use swagger 2.0. thanks. in advanceServer Variables - can it be refrenced?
i am using openapi:3.0.0 i have five servers define in swagger inside it i am using variables specific to servers. something like this servers: - url: https://server1/api/{version} description: server variables: version: description: versioning of api enum: - v1 default: v1 - url: https://server2/api/{version} description: server variables: version: description: versioning of api enum: - v1 default: v1 Can we declare variables once and can we reference in multiple servers? here i am breaking "DRY" by declaring same variables again and again.Can't upload files within a nested object Asp.NET
I'm working with asp.net. Usually when you want to include file data in your http request you can use the interface IFormFile within your input object. For example, if I define the object public class A { public IFormFile file {get; set; } } and then an endpoint: public ActionResult Test([FromForm] A a) {...} it will generate a GUI that lets you upload a file. This is all fine but I'm encountering a case where it has problems. If a define an object B that contains a collection of A: public class A { public IEnumerable<A> objects {get; set; } } then the generated GUI won't let me upload a file for the nested field B.A.File and instead it treats it as a simple string. If anyone has a solution for this it'd help me very muchDeep-linking to schema docs
While deep-linking API endpoints works as described on https://swagger.io/docs/open-source-tools/swagger-ui/usage/deep-linking/, schemas aren't included it seems. When I manually add an anchor to the HTML node id of a schema div, a `/` prefix gets added automatically, making the browser NOT find that id. When I then remove the slash and press Return in the location bar, things work as expected. Am I doing something wrong? If not, can schema support be added (expanding a schema currently does not rewrite the anchor)?CORS error on using try out feature in swagger-ui-react
I integrated swagger-ui-react to display API documentation and utilized its tryout feature for API testing. However, after enabling Bearer Token authorization, I encountered a CORS error on all API calls performed from the swagger-ui tool. Can anyone help me to resolve this issue?Error message Can't read from file myWebsite.com:443/swagger/docs/v1
Hi everyone, I am dealing with a peculiar validation error on our swagger UI implementation. The swagger validator is marking the website as invalid, and when you click on the validator link it returns the error message: {"schemaValidationMessages":[{"level":"error","message":"Can't read from file https://mywebsite.com:443/swagger/docs/v1"}]} the strange thing is that if I browse tohttps://mywebsite.com:443/swagger/docs/v1from an external computer The text of the documentation is displayed, so the url is publicly accessible. Any ideas?Regarding swagger is not working in nodejs as per the swagger document.
Hi there, I tried to setup swagger on nodejs as per the document par it is not working and present wrong data of swagger UI see the below attached screenshot. So just wanted to know how to setup swagger in nodejs so that all my apis display in one place. I tried lot of solutions on different different websites but same issue appeared. So kindly guide how to do that so that swagger is running properly. Reference site that I tried below: https://swagger.io/docs/open-source-tools/swagger-codegen/#:~:text=The%20Swagger%20Codegen%20is%20an,can%20be%20found%20in%20GitHub. https://levelup.gitconnected.com/how-to-add-swagger-ui-to-existing-node-js-and-express-js-project-2c8bad9364ce https://medium.com/bb-tutorials-and-thoughts/how-to-add-swagger-to-nodejs-rest-api-7a542cfdc5e1 https://plainenglish.io/blog/how-to-implement-and-use-swagger-in-nodejs-d0b95e765245 https://dev.to/kabartolo/how-to-document-an-express-api-with-swagger-ui-and-jsdoc-50do https://itnext.io/setting-up-swagger-in-a-node-js-application-d3c4d7aa56d4 https://github.com/Surnet/swagger-jsdoc/blob/master/README.md Looking forward to hearing from you. Thanks! Swagger.json: { "swagger": "2.0", "info": { "version": "1.0.0", "title": "My User Project CRUD", "description": "My User Project Application API", "license": { "name": "MIT", "url": "https://opensource.org/licenses/MIT" } }, "host": "localhost:3000", "basePath": "/", "tags": [ { "name": "Users", "description": "API for users in the system" } ], "schemes": ["http"], "consumes": ["application/json"], "produces": ["application/json"] } Server.js: import swaggerUi from 'swagger-ui-express'; import swaggerDocument from './swagger.json'; app.use( '/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument) ); app.listen(port, () => { console.log(`Server running at ${process.env.SERVER_URL}`); });2.5KViews0likes6Comments