
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
get-openapi-examples
Advanced tools
Extract all possible paths present in openapi.yaml based on paths and the provided examples
openapi.yaml
based on paths and the provided examplesThis might be useful, for example, for testing routes. It supports different types of examples, and variables may be in the path or in the query.
If you have a openapi.yaml
file like this one, for example:
paths:
/coordinates:
get:
operationId: getDataByCoordinates
summary: Get data by Coordinates in query
parameters:
- in: query
name: lat
schema:
type: string
example: '40.153687'
description: Latitude of the point
- in: query
name: lon
schema:
type: string
example: '-8.514602'
description: Longitude of the point
/district/{district}:
get:
operationId: getDistrict
summary: Data of Distrito
parameters:
- in: path
name: district
required: true
schema:
type: string
examples:
porto:
value: Porto
summary: District of Porto
lisbon:
value: Lisbon
summary: District of Lisbon
/district/{district}/altimetry:
get:
operationId: getDistrictAltimetry
summary: Altimetry of Distrito
parameters:
- in: path
name: district
required: true
schema:
type: string
example: Porto
Then:
const getOpenapiExamples = require('get-openapi-examples')
console.log(getOpenapiExamples('/path/to/openapi.yaml'))
/*
[
'/coordinates?lat=40.153687&lon=-8.514602',
'/district/Porto',
'/district/Lisbon',
'/district/Porto/altimetry'
}
*/
FAQs
Extract all possible paths present in openapi.yaml based on paths and the provided examples
The npm package get-openapi-examples receives a total of 0 weekly downloads. As such, get-openapi-examples popularity was classified as not popular.
We found that get-openapi-examples demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.