openapi-snippet icon indicating copy to clipboard operation
openapi-snippet copied to clipboard

Generates code snippets for given Swagger / Open API documents

Results 37 openapi-snippet issues
Sort by recently updated
recently updated
newest added

Would love to use the project - unfortunately I'm currently tied to supporting older versions of Node and there's currently one tiny issue preventing me from being able to use...

added support for examples if no default. Also added support for properties when type is not an object

Primarily this is to fix the TypeError that is thrown if a parameter is missing any type information. Such an error makes it hard to debug your spec: ``` /openapi-snippet/openapi-to-har.js:441...

I'm working on fixes for the following: * If a parameter is missing a `type` and also missing `schema` then a TypeError is thrown: ```bash /openapi-snippet/openapi-to-har.js:441 'SOME_' + (param.type ||...

Add query param only if the parameter object has `required: true`

Issue: Given swagger path of `/blogs/{blogId}`, generated code snippets will have URL with text `/blogs/%7DblogId%7D`. Suggestions: Possibly leave brackets or put placeholder text like `BLOGID` as is done with query...

Getting this with a valid OAS v2 file: ``` TypeError: Cannot read property 'securitySchemes' of undefined at getHeadersArray (/repo/node_modules/openapi-snippet/openapi-to-har.js:309:48) at createHar (/repo/node_modules/openapi-snippet/openapi-to-har.js:44:14) at Object.openApiToHarList [as getAll] (/repo/node_modules/openapi-snippet/openapi-to-har.js:379:21) at Object.getSnippets (/repo/node_modules/openapi-snippet/index.js:63:32)...

This introduces a solution for the issue [#62](https://github.com/ErikWittern/openapi-snippet/issues/62) and following [#64](https://github.com/ErikWittern/openapi-snippet/issues/64). Solution This changes the response format of both `getSnippets` and `getEndpointSnippets`. As the response format is changed, test cases...

I followed the steps to clone, npm install, and then npm build. This generates a min.js file. However, when I add this to a script tag and then try to...