Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/layer5io/kubeopenapi-jsonschema
https://github.com/layer5io/kubeopenapi-jsonschema
hacktoberfest kubernetes openapi service-mesh service-mesh-management
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/layer5io/kubeopenapi-jsonschema
- Owner: layer5io
- License: apache-2.0
- Created: 2021-06-26T17:10:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-24T11:14:19.000Z (over 1 year ago)
- Last Synced: 2024-05-01T14:55:08.304Z (9 months ago)
- Topics: hacktoberfest, kubernetes, openapi, service-mesh, service-mesh-management
- Language: JavaScript
- Homepage: https://layer5.io
- Size: 216 KB
- Stars: 16
- Watchers: 7
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING-gitflow.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# KubeOpenAPI - JSON Schema
This is a very basic node based CLI for converting OpenAPI schema to JSON Schema Draft 4
```
Usage: kubeopenapi-jsonschema [options]Options:
-t, --type [type] set type of input, can be either yaml or json (default: "yaml")
-l, --location location of the schema
-f, --filter [query] give a query if a OpenAPISchema is nested
--kubernetes enable kubernetes specific filters (default: false)
-o [output-format] output format (default: "json")
--o-filter [output-filter] output filter query
--silent skip output (default: false)
--resolve [resolve-filter] root of the OpenAPI spec to resolve the $ref. It is important to note that this jsonpath MUST evaluate to one object (default: "")
-h, --help display help for command
```## Example
Download the binaries from the github releases. Only linux-x64, darwin-x64 and windows-x64 binaries are released
```bash
kubeopenapi-jsonschema --location ./k8s.json -f '$.definitions' -t json --o-filter '$[0][?(@["x-kubernetes-group-version-kind"][0].kind=="Deployment")].properties.spec' --resolve "$"
```The above will consume kubernetes open API schema and will produce schema for Kubernetes `Deployment`
```bash
kubeopenapi-jsonschema --location ./istio.yaml -t yaml --filter '$[?(@.kind=="CustomResourceDefinition")]..schema.openAPIV3Schema.properties.spec' --o-filter '$'
```The above will consume istio CRD manifest and will produce schema for all of the CustomResourceDefinition objects
## Join the Community!
Our projects are community-built and welcome collaboration. 👍 Be sure to see the Layer5 Community Welcome Guide for a tour of resources available to you and jump into our Slack!Find your MeshMate
MeshMates are experienced Layer5 community members, who will help you learn your way around, discover live projects and expand your community network.
Become a Meshtee today!Find out more on the Layer5 community.
✔️ Join any or all of the weekly meetings on community calendar.
✔️ Watch community meeting recordings.
✔️ Access the Community Drive by completing a community Member Form.
Not sure where to start? Grab an open issue with the help-wanted label.