Outline ·
[ Standard ] ·
Linear+
OpenAPI Swagger help, complete noob here
|
TSnarf03
|
Jul 29 2022, 07:55 AM, updated 4y ago
|
|
anybody used openAPI or swagger b4 ? https://swagger.io/docs/specification/adding-examples/im not building the swagger openapi, but want to connect and test, what tool should i use ? like somebody gave me an url, but never tell me to use a browser to open, i dont know thats an url, i wont be able to use that url, if i type that url into notepad, nothing will happen. now the problem is what application or software should i use to TEST(or call) a swagger link ? somebody provided me a link and a token, i clicked on the link, it shows 2 double quotation mark "" how do i attach the token into it ? sorry that im not able to provide the link nor the token here.
|
|
|
|
|
|
AthrunIJ
|
Jul 29 2022, 08:11 AM
|
|
Should be a standard REST API. Go and read up about it.
If Python, use the 3rd party requests library and get started.
Can even try Postman standalone program for testing. It is free
This post has been edited by AthrunIJ: Jul 29 2022, 08:22 AM
|
|
|
|
|
|
13th
|
Jul 29 2022, 08:33 AM
|
|
I've been using swagger and latest OAS3, basically it is an integrated Documented Postman serving a REST HTTP, be it in Java/Phyton/etc. To use swagger, the REST APIs need to be existed first and can be called by curl or wget or postman or browser.
Edit: Adding more context, swagger need a yaml to tell what REST API it is serving.
Example you have a standard HTTP 200 GET /get/helloworld api, swagger can map to this API in Swagger UI, and can set a pre-defined example. Another example if you POST a JsonObject, using Swagger, you can pre-defined the key and values and so on
This post has been edited by 13th: Jul 29 2022, 08:37 AM
|
|
|
|
|
|
TSnarf03
|
Jul 29 2022, 08:35 AM
|
|
QUOTE(13th @ Jul 29 2022, 08:33 AM) I've been using swagger and latest OAS3, basically it is an integrated Documented Postman serving a REST HTTP, be it in Java/Phyton/etc. To use swagger, the REST APIs need to be existed first and can be called by curl or wget or postman or browser. for browser, how do you include a token ?
|
|
|
|
|
|
silverhawk
|
Jul 29 2022, 04:13 PM
|
Eyes on Target
|
QUOTE(narf03 @ Jul 29 2022, 08:35 AM) for browser, how do you include a token ? You could get a browser extension that allows you to modify HTTP Headers, and add the token bearer header manually
|
|
|
|
|
|
ragk
|
Jul 29 2022, 06:21 PM
|
|
QUOTE(narf03 @ Jul 29 2022, 08:35 AM) for browser, how do you include a token ? Dint the swagger page come with UI? Usually swagger page come with handy UI where u can enter ur auth easily unless they hide the UI from public.
|
|
|
|
|