Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmadnassri/node-oas-schemas
OAS Schemas
https://github.com/ahmadnassri/node-oas-schemas
node oas openapi schema
Last synced: about 1 month ago
JSON representation
OAS Schemas
- Host: GitHub
- URL: https://github.com/ahmadnassri/node-oas-schemas
- Owner: ahmadnassri
- License: mit
- Created: 2020-11-04T19:13:30.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T20:01:38.000Z (5 months ago)
- Last Synced: 2024-10-01T00:06:07.083Z (about 2 months ago)
- Topics: node, oas, openapi, schema
- Language: JavaScript
- Homepage:
- Size: 292 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# OAS Schemas
Schema files for Specification, kept automatically up-to-date
[![license][license-img]][license-url]
[![release][release-img]][release-url]
[![super linter][super-linter-img]][super-linter-url]
[![test][test-img]][test-url]
[![semantic][semantic-img]][semantic-url]## Why
There are a few "OAS Schema" packages already, however, most come with extra bloat, and all of them are manually updated by the maintainer.
This package is automatically updated by [`Dependabot`][], and deployed / published with [GitHub Actions][]
## What
A simple npm package that includes the OAS Schema files and exports them for usage in your code.
.
├── LICENSE
├── index.js
└── schemas
├── v1.2
│ ├── README.md
│ ├── apiDeclaration.json
│ ├── authorizationObject.json
│ ├── dataType.json
│ ├── dataTypeBase.json
│ ├── infoObject.json
│ ├── modelsObject.json
│ ├── oauth2GrantType.json
│ ├── operationObject.json
│ ├── parameterObject.json
│ ├── resourceListing.json
│ └── resourceObject.json
├── v2.0
│ ├── README.md
│ └── schema.json
└── v3.0
├── README.md
├── schema.json
└── schema.yaml## How
``` js
// directly require the JSON schema files
const oas2 = require('oas-schemas/schemas/v2.0/schema.json')
const oas3 = require('oas-schemas/schemas/v3.0/schema.json')// require all the schemas in one object
const schemas = require('oas-schemas')/** schemas is an object with the following shape:
{
1.2: {
apiDeclaration: ...
authorizationObject: ...
dataType: ...
dataTypeBase: ...
infoObject: ...
modelsObject: ...
oauth2GrantType: ...
operationObject: ...
parameterObject: ...
resourceListing: ...
resourceObject: ...
},
2.0: ...
3.0: ...
}
*/
```[`Dependabot`]: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/about-dependabot-version-updates
[GitHub Actions]: .github/workflows/release.yml----
> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) •
> Twitter: [@AhmadNassri](https://twitter.com/AhmadNassri)[license-url]: LICENSE
[license-img]: https://badgen.net/github/license/ahmadnassri/node-oas-schemas[release-url]: https://github.com/ahmadnassri/node-oas-schemas/releases
[release-img]: https://badgen.net/github/release/ahmadnassri/node-oas-schemas[super-linter-url]: https://github.com/ahmadnassri/node-oas-schemas/actions?query=workflow%3Asuper-linter
[super-linter-img]: https://github.com/ahmadnassri/node-oas-schemas/workflows/super-linter/badge.svg[test-url]: https://github.com/ahmadnassri/node-oas-schemas/actions?query=workflow%3Atest
[test-img]: https://github.com/ahmadnassri/node-oas-schemas/workflows/test/badge.svg[semantic-url]: https://github.com/ahmadnassri/node-oas-schemas/actions?query=workflow%3Arelease
[semantic-img]: https://badgen.net/badge/📦/semantically%20released/blue