New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

typera-openapi

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typera-openapi - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

8

dist/generate.js

@@ -63,2 +63,3 @@ "use strict";

const description = getRouteDescription(ctx, symbol);
const summary = getRouteSummary(ctx, symbol);
const routeInput = getRouteInput(ctx, symbol);

@@ -82,3 +83,3 @@ if (!routeInput)

{
[method]: Object.assign(Object.assign(Object.assign(Object.assign({}, (description ? { description } : undefined)), (parameters.length > 0 ? { parameters } : undefined)), operationRequestBody(requestBody)), { responses }),
[method]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (summary ? { summary } : undefined)), (description ? { description } : undefined)), (parameters.length > 0 ? { parameters } : undefined)), operationRequestBody(requestBody)), { responses }),
},

@@ -91,2 +92,7 @@ ];

.join('');
const getRouteSummary = (ctx, symbol) => symbol
.getJsDocTags()
.filter((tag) => tag.name === 'summary')
.map((tag) => tag.text)
.filter(utils_1.isDefined)[0];
const operationRequestBody = (contentSchema) => {

@@ -93,0 +99,0 @@ if (!contentSchema)

4

package.json
{
"name": "typera-openapi",
"version": "0.4.0",
"version": "0.5.0",
"description": "Generate OpenAPI spec from typera routes",
"main": "index.js",
"repository": "https://github.com/akheron/typera-openapi",

@@ -12,2 +11,3 @@ "author": "Petri Lehtinen <petri@digip.org>",

],
"main": "dist/index.js",
"typings": "./dist/index.d.ts",

@@ -14,0 +14,0 @@ "bin": {

@@ -25,2 +25,4 @@ # typera-openapi - typera to OpenAPI generator

*
* @summary You can also set a short summary
*
* @response 200 Success response description.

@@ -93,3 +95,14 @@ * @response 400 Another description for a response. This one

## Releasing
```
$ yarn version --new-version <major|minor|patch>
$ yarn publish
$ git push origin main --tags
```
Open https://github.com/akheron/typera-openapi/releases, edit the draft release,
select the newest version tag, adjust the description as needed.
[openapi v3]: https://swagger.io/specification/
[typera]: https://github.com/akheron/typera
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc