├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── ci.yml
│ ├── documentation.md
│ ├── feature_request.md
│ └── question.md
├── PULL_REQUEST_TEMPLATE.md
├── config.yml
├── readme
│ └── images
│ │ ├── Layer5-MeshMentors.png
│ │ ├── community.svg
│ │ ├── slack-128.png
│ │ └── slack-dark-128.png
├── release-drafter.yml
├── stale.yml
├── welcome
│ └── Layer5-celebration.png
└── workflows
│ ├── build-and-release.yml
│ ├── build.yml
│ ├── release-drafter.yml
│ └── slack.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING-gitflow.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── helper
├── createQuery.js
├── output.js
└── toJSONSchema.js
├── index.js
├── package-lock.json
└── package.json
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🐛 Bug Report
3 | about: Report an issue to help improve the project.
4 | title: ''
5 | labels: 'kind/bug'
6 | assignees: ''
7 | ---
8 | #### Description
9 |
10 |
11 | #### Expected Behavior
12 |
13 |
14 | #### Screenshots/Logs
15 |
16 |
17 | #### Environment:
18 | - Meshery Version:
19 | - Kubernetes Version:
20 | - Host OS:
21 | - Browser:
22 |
23 |
31 | - 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/qJy1c95qirjgWQODApilR9)
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/ci.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🛠 Continuous Integration / DevOps
3 | about: Improve or update workflows or other automation
4 | title: '[CI]'
5 | labels: 'area/ci'
6 | assignees: ''
7 | ---
8 | #### Current Behavior
9 |
10 |
11 | #### Desired Behavior
12 |
13 |
14 | #### Implementation
15 |
16 |
17 | #### Acceptance Tests
18 |
19 |
20 | #### Reference:
21 | - [Meshery Build & Release Strategy](https://docs.google.com/document/d/11nAxYtz2SUusCYZ0JeNRrOLIxkgmmbUVWz63MBZV2oE/edit#)
22 | - 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/qJy1c95qirjgWQODApilR9)
23 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 📄 Documentation issue
3 | about: Issues related to documentation.
4 | title: '[Docs]'
5 | labels: 'area/docs'
6 | assignees: ''
7 | ---
8 | **Current State:**
9 |
10 | **Desired State:**
11 |
12 | ---
13 | **Contributor Resources**
14 | - [Meshery documentation site](https://docs.meshery.io/)
15 | - [Meshery documentation source](https://github.com/layer5io/meshery/tree/master/docs)
16 | - [Instructions for contributing to documentation](https://github.com/layer5io/meshery/blob/master/CONTRIBUTING.md#documentation-contribution-flow)
17 | - 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/qJy1c95qirjgWQODApilR9)
18 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 💡 Feature Request
3 | about: Suggest an enhancement to Meshery.
4 | title: ''
5 | labels: 'kind/enhancement'
6 | assignees: ''
7 | ---
8 | #### Current Behavior
9 |
10 |
11 | #### Desired Behavior
12 |
13 |
14 | #### Implementation
15 |
16 |
17 | #### Acceptance Tests
18 |
19 |
20 | #### Mockups
21 |
22 |
23 | ---
24 | **[Contributor Guide](https://docs.meshery.io/project/contributing)**
25 | - 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/qJy1c95qirjgWQODApilR9)
26 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: 🙋🏾🙋🏼Question
4 | url: https://github.com/layer5io/meshery/discussions/new
5 | about: Submit your question using GitHub Discussions.
6 | - 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/qJy1c95qirjgWQODApilR9)
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | **Description**
2 |
3 | This PR fixes #
4 |
5 | **Notes for Reviewers**
6 |
7 |
8 | **[Signed commits](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)**
9 | - [ ] Yes, I signed my commits.
10 |
11 |
12 |
24 |
--------------------------------------------------------------------------------
/.github/config.yml:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
3 | # Comment to be posted to on first time issues
4 | newIssueWelcomeComment: >
5 | Thanks for opening this issue. A contributor will be by to give feedback soon. In the meantime, please review the [Layer5 Community Welcome Guide](https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit?usp=sharing) and sure to join the [community Slack](http://slack.layer5.io/).
6 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
7 | # Comment to be posted to on PRs from first time contributors in your repository
8 | newPRWelcomeComment: >
9 | Yay, your first pull request! :thumbsup: A contributor will be by to give feedback soon. In the meantime, please review the [Layer5 Community Welcome Guide](https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit?usp=sharing) and sure to join the [community Slack](http://slack.layer5.io/).
10 |
11 | Be sure to double-check that you have signed your commits. Here are instructions for [making signing an implicit activity while peforming a commit](../CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin).
12 |
13 |
14 | #-------------------------------------------------------------------------------
15 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
16 | # Comment to be posted to on pull requests merged by a first time user
17 | firstPRMergeComment: >
18 | Thank you for contributing to the Layer5 community! :tada:
19 | \
20 | \
21 | 
22 | \
23 | \
24 | :star: Please leave a [star on the project](../stargazers). :smile:
25 |
26 |
27 | #-------------------------------------------------------------------------------
28 | # Configuration for request-info - https://github.com/behaviorbot/request-info
29 | # Comment to reply with
30 | requestInfoReplyComment: >
31 | Thanks for opening this issue. We welcome all input! If you could provide a little more information, this will greatly aide in its resolution. :thumbsup:
32 | # *OPTIONAL* Add a list of people whose Issues/PRs will not be commented on
33 | # keys must be GitHub usernames
34 | #requestInfoUserstoExclude:
35 | # - layer5io/maintainers
36 |
37 |
38 | #-------------------------------------------------------------------------------
39 | # Configuration for sentiment-bot - https://github.com/behaviorbot/sentiment-bot
40 | # *Required* toxicity threshold between 0 and .99 with the higher numbers being the most toxic
41 | # Anything higher than this threshold will be marked as toxic and commented on
42 | sentimentBotToxicityThreshold: .9
43 |
44 | # *Required* Comment to reply with
45 | sentimentBotReplyComment: >
46 | Please be sure to review the code of conduct and be respectful of other users. // @layer5io/maintainers
47 |
48 |
--------------------------------------------------------------------------------
/.github/readme/images/Layer5-MeshMentors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/layer5io/kubeopenapi-jsonschema/f4b36601234dd9c995c08db7a8ad6dc5145c7f30/.github/readme/images/Layer5-MeshMentors.png
--------------------------------------------------------------------------------
/.github/readme/images/community.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/readme/images/slack-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/layer5io/kubeopenapi-jsonschema/f4b36601234dd9c995c08db7a8ad6dc5145c7f30/.github/readme/images/slack-128.png
--------------------------------------------------------------------------------
/.github/readme/images/slack-dark-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/layer5io/kubeopenapi-jsonschema/f4b36601234dd9c995c08db7a8ad6dc5145c7f30/.github/readme/images/slack-dark-128.png
--------------------------------------------------------------------------------
/.github/release-drafter.yml:
--------------------------------------------------------------------------------
1 | name-template: 'v$NEXT_PATCH_VERSION'
2 | tag-template: 'v$NEXT_PATCH_VERSION'
3 | categories:
4 | - title: '🚀 Features'
5 | labels:
6 | - 'kind/feature'
7 | - 'kind/enhancement'
8 | - title: '🐛 Bug Fixes'
9 | labels:
10 | - 'fix'
11 | - 'bugfix'
12 | - 'kind/bug'
13 | - title: '🧰 Maintenance'
14 | labels:
15 | - 'kind/chore'
16 | - 'chore'
17 | change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
18 | template: |
19 | ## What's New
20 | $CHANGES
21 |
22 | ## Contributors
23 |
24 | Thank you to our contributors for making this release possible:
25 | $CONTRIBUTORS
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 45
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 10
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - issue/willfix
8 | # Label to use when marking an issue as stale
9 | staleLabel: issue/stale
10 | # Comment to post when marking an issue as stale. Set to `false` to disable
11 | markComment: >
12 | This issue has been automatically marked as stale because it has not had
13 | recent activity. It will be closed if no further activity occurs. Thank you
14 | for your contributions.
15 | # Comment to post when closing a stale issue. Set to `false` to disable
16 | closeComment: >
17 | This issue is being automatically closed due to inactivity.
18 | However, you may choose to reopen this issue.
19 |
--------------------------------------------------------------------------------
/.github/welcome/Layer5-celebration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/layer5io/kubeopenapi-jsonschema/f4b36601234dd9c995c08db7a8ad6dc5145c7f30/.github/welcome/Layer5-celebration.png
--------------------------------------------------------------------------------
/.github/workflows/build-and-release.yml:
--------------------------------------------------------------------------------
1 | name: Build and Release
2 | on:
3 | release:
4 | types: [published]
5 |
6 | jobs:
7 | build_and_release:
8 | name: Build and release
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Checkout code
12 | uses: actions/checkout@v2
13 | - name: Setup Node.js
14 | uses: actions/setup-node@v2
15 | with:
16 | node-version: 12.9.1
17 | cache: 'npm'
18 | - name: Setup dependencies
19 | run: |
20 | npm ci
21 | npm i -g nexe
22 | - name: Build artifacts
23 | run: make
24 | - name: Release artifacts
25 | uses: ncipollo/release-action@v1
26 | with:
27 | artifacts: 'kubeopenapi-jsonschema*'
28 | allowUpdates: true
29 | omitBodyDuringUpdate: true
30 | omitNameDuringUpdate: true
31 | token: ${{ secrets.GITHUB_TOKEN }}
32 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build
2 | on:
3 | push:
4 | branches:
5 | - 'master'
6 | tags:
7 | - 'v*'
8 |
9 | jobs:
10 | build:
11 | name: Build
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout code
15 | uses: actions/checkout@v3
16 | - name: Setup Node.js
17 | uses: actions/setup-node@v3.1.1
18 | with:
19 | node-version: 12.9.1
20 | cache: 'npm'
21 | - name: Setup dependencies
22 | run: |
23 | npm ci
24 | npm i -g nexe
25 | - name: Build artifacts
26 | run: make
27 |
28 |
--------------------------------------------------------------------------------
/.github/workflows/release-drafter.yml:
--------------------------------------------------------------------------------
1 | name: Release Drafter
2 |
3 | on:
4 | push:
5 | # our release branch
6 | branches:
7 | - master
8 |
9 | jobs:
10 | update_release_draft:
11 | runs-on: ubuntu-latest
12 | steps:
13 | # Drafts your next Release notes as Pull Requests are merged into "master"
14 | - uses: release-drafter/release-drafter@v5
15 | with:
16 | config-name: release-drafter.yml
17 | env:
18 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/.github/workflows/slack.yml:
--------------------------------------------------------------------------------
1 | name: Slack Notify on Star
2 | on: watch
3 | jobs:
4 | star-notify:
5 | name: Notify Slack on star
6 | runs-on: ubuntu-latest
7 | steps:
8 | - name: Get current star count
9 | run: |
10 | echo "STARS=$(curl --silent 'https://api.github.com/repos/layer5io/kubeopenapi-jsonschema' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
11 | - name: Notify slack
12 | env:
13 | SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
14 | uses: pullreminders/slack-action@master
15 | with:
16 | args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"Someone just starred kubeopenapi-jsonschema! (https://github.com/layer5io/kubeopenapi-jsonschema/stargazers) Total ⭐️: ${{env.STARS}}\"}'
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 |
8 | # Test binary, built with `go test -c`
9 | *.test
10 |
11 | # Output of the go coverage tool, specifically when used with LiteIDE
12 | *.out
13 |
14 | # Dependency directories (remove the comment below to include it)
15 | # vendor/
16 | node_modules
17 |
18 | *.yaml
19 | openapi-jsonschema*
20 |
21 | .vscode/*
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Layer5 Community Code of Conduct
2 |
3 | The Layer5 community follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
4 |
5 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting community@layer5.io.
6 |
--------------------------------------------------------------------------------
/CONTRIBUTING-gitflow.md:
--------------------------------------------------------------------------------
1 | # Working by Forking
2 | Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or just head straight to the command line:
3 |
4 | ## Clone your fork to your local machine
5 | ```
6 | git clone git@github.com:USERNAME/FORKED-PROJECT.git
7 | ```
8 | Keeping Your Fork Up to Date
9 | While this isn't an absolutely necessary step, if you plan on doing anything more than just a tiny quick fix, you'll want to make sure you keep your fork up to date by tracking the original "upstream" repo that you forked. To do this, you'll need to add a remote:
10 |
11 | ## Add 'upstream' repo to list of remotes
12 | ```
13 | git remote add upstream https://github.com/layer5io/meshery.git
14 | ```
15 | ("meshery" is used as the example repo. Be sure to reference the _actual_ repo you're contributing to e.g. "meshery-linkerd").
16 |
17 | ## Verify the new remote named 'upstream'
18 | ```
19 | git remote -v
20 | ```
21 | Whenever you want to update your fork with the latest upstream changes, you'll need to first fetch the upstream repo's branches and latest commits to bring them into your repository:
22 |
23 | ## Fetch from upstream remote
24 | ```
25 | git fetch upstream
26 | ```
27 |
28 | ## View all branches, including those from upstream
29 | ```
30 | git branch -va
31 | ```
32 | Now, checkout your own master branch and merge the upstream repo's master branch:
33 |
34 | ## Checkout your master branch and merge upstream
35 | ```
36 | git checkout master
37 | git merge upstream/master
38 | ```
39 | If there are no unique commits on the local master branch, git will simply perform a fast-forward. However, if you have been making changes on master (in the vast majority of cases you probably shouldn't be - see the next section, you may have to deal with conflicts. When doing so, be careful to respect the changes made upstream.
40 |
41 | Now, your local master branch is up-to-date with everything modified upstream.
42 |
43 | **Create a Branch** (doing your work)
44 | Whenever you begin work on a new feature or bugfix, it's important that you create a new branch. Not only is it proper git workflow, but it also keeps your changes organized and separated from the master branch so that you can easily submit and manage multiple pull requests for every task you complete.
45 |
46 | To create a new branch and start working on it, peform the following flow.
47 |
48 | ## Checkout the master branch - you want your new branch to come from master
49 | ```
50 | git checkout master
51 | ```
52 |
53 | ## Create a new branch (give your branch its own simple informative name)
54 | For enhancements use `feature/your_username/issue#` or `feature/your_username/name_of_feature`
55 |
56 | For bugs use `bug/your_username/issue#` or `bug/your_username/name_of_bug`
57 |
58 | ```
59 | git branch feature/jdoe/567
60 | ```
61 |
62 | ## Switch to your new branch
63 | ```
64 | git checkout feature/jdoe/567
65 | ```
66 | Now, go to town hacking away and making whatever changes you want to.
67 |
68 | ## Submitting your changes (a Pull Request)
69 | Prior to submitting your pull request, you might want to do a few things to clean up your branch and make it as simple as possible for the original repo's maintainer to test, accept, and merge your work.
70 |
71 | In the time that you've been working on your changes, if any commits have been made to the upstream master branch, you will need to rebase your development branch so that merging it will be a simple fast-forward that won't require any conflict resolution work.
72 |
73 | ## Fetch upstream master and merge with your repo's master branch
74 | ```
75 | git fetch upstream
76 | git checkout master
77 | git merge upstream/master
78 | ```
79 |
80 | ## If there were any new commits, rebase your development branch
81 | ```
82 | git checkout feature/jdoe/567
83 | git rebase master
84 | ```
85 | Now, it may be desirable to squash some of your smaller commits down into a small number of larger more cohesive commits. You can do this with an interactive rebase:
86 |
87 | ## Rebase all commits on your development branch
88 | ```
89 | git checkout
90 | git rebase -i master
91 | ```
92 | This will open up a text editor where you can specify which commits to squash.
93 |
94 | ## Submitting
95 | Once you've committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. If you need to make any adjustments to your pull request, just push the updates to GitHub. Your pull request will automatically track the changes on your development branch and update.
96 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Overview
2 | Please do! Thanks for your help improving the project! :balloon:
3 |
4 | All contributors are welcome. Please see the [newcomers welcome guide](https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit) for how, where and why to contribute. This project is community-built and welcomes collaboration. Contributors are expected to adhere to our [Code of Conduct](.CODE_OF_CONDUCT.md).
5 |
6 | Not sure where to start? First, see the [newcomers welcome guide](https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit). Grab an open issue with the [help-wanted label](../../labels/help%20wanted) and jump in. Join the [Slack account](http://slack.layer5.io) and engage in conversation. Create a [new issue](/../../issues/new/choose) if needed. All [pull requests](/../../pulls) should reference an open [issue](/../../issues). Include keywords in your pull request descriptions, as well as commit messages, to [automatically close issues in GitHub](https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords).
7 |
8 | **Sections**
9 | - General Contribution Flow
10 | - Developer Certificate of Origin
11 |
12 | Relevant coding style guidelines are the Go Code Review Comments and the Formatting and style section of Peter Bourgon's Go: Best Practices for Production Environments.
13 |
14 | # General Contribution Flow
15 |
16 | In order to contribute to Meshery, please follow the fork-and-pull request workflow described [here](./CONTRIBUTING-gitflow.md).
17 |
18 | ## Signing-off on Commits (Developer Certificate of Origin)
19 |
20 | To contribute to this project, you must agree to the Developer Certificate of
21 | Origin (DCO) for each commit you make. The DCO is a simple statement that you,
22 | as a contributor, have the legal right to make the contribution.
23 |
24 | See the [DCO](https://developercertificate.org) file for the full text of what you must agree to
25 | and how it works [here](https://github.com/probot/dco#how-it-works).
26 | To signify that you agree to the DCO for contributions, you simply add a line to each of your
27 | git commit messages:
28 |
29 | ```
30 | Signed-off-by: Jane Smith
31 | ```
32 |
33 | In most cases, you can add this signoff to your commit automatically with the
34 | `-s` or `--signoff` flag to `git commit`. You must use your real name and a reachable email
35 | address (sorry, no pseudonyms or anonymous contributions). An example of signing off on a commit:
36 | ```
37 | $ commit -s -m “my commit message w/signoff”
38 | ```
39 |
40 | To ensure all your commits are signed, you may choose to add this alias to your global ```.gitconfig```:
41 |
42 | *~/.gitconfig*
43 | ```
44 | [alias]
45 | amend = commit -s --amend
46 | cm = commit -s -m
47 | commit = commit -s
48 | ```
49 | Or you may configure your IDE, for example, Visual Studio Code to automatically sign-off commits for you:
50 |
51 |
52 |
53 | ## Documentation Contribution Flow
54 | Please contribute! Layer5 documentation uses Jekyll and GitHub Pages to host docs sites. Learn more about [Layer5's documentation framework](https://docs.google.com/document/d/17guuaxb0xsfutBCzyj2CT6OZiFnMu9w4PzoILXhRXSo/edit?usp=sharing). The process of contributing follows this flow:
55 |
56 | 1. Create a fork, if you have not already, by following the steps described [here](./CONTRIBUTING-gitflow.md)
57 | 1. In the local copy of your fork, navigate to the docs folder.
58 | `cd docs`
59 | 1. Create and checkout a new branch to make changes within
60 | `git checkout -b `
61 | 1. Edit/add documentation.
62 | `vi .md`
63 | 1. Run site locally to preview changes.
64 | `make site`
65 | 1. Commit, [sign-off](#commit-signing), and push changes to your remote branch.
66 | `git push origin `
67 | 1. Open a pull request (in your web browser) against the repo.
68 |
69 |
70 | #### Tests
71 | Users can now test their code on their local machine against the CI checks implemented using `make run-tests`.
72 |
73 | To test code changes on your local machine, run the following command:
74 | ```
75 | make run-tests
76 | ```
77 |
78 | #### Building Docker image
79 | To build a Docker image of the project, please ensure you have `Docker` installed to be able to build the image. Now, run the following command to build the Docker image:
80 | ```sh
81 | make docker
82 | ```
83 |
84 | ### UI Lint Rules
85 |
86 | Layer5 uses ES-Lint to maintain code quality & consistency in our UI Code.
87 |
88 | # Reviews
89 | All contributors are invited to review pull requests. See this short video on [how to review a pull request](https://www.youtube.com/watch?v=isLfo7jfE6g&feature=youtu.be).
90 |
91 | # New to Git?
92 | Resources: https://lab.github.com and https://try.github.com/
93 |
94 | ### License
95 |
96 | This repository and site are available as open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0).
97 |
98 | ### About Layer5
99 |
100 | **Community First**
101 |
The Layer5 community represents the largest collection of service mesh projects and their maintainers in the world.
102 |
103 | **Open Source First**
104 |
Our projects establish industry standards and enable service developers, owners, and operators with repeatable patterns and best practices for managing all aspects of distributed services. Our shared commitment to the open source spirit push the Layer5 community and its projects forward.
105 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2020 Layer5, Inc.
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | make: linux darwin windows
2 |
3 | #
4 | # ALL SUPPORT
5 | #
6 |
7 | darwin: darwin-arm
8 | nexe index.js -t darwin-x64 -o kubeopenapi-jsonschema-darwin -r "./node_modules/**/*"
9 |
10 | linux: linux-arm
11 | nexe index.js -t linux-x64 -o kubeopenapi-jsonschema -r "./node_modules/**/*"
12 |
13 | windows: windows-arm
14 | nexe index.js -t windows-x64 -o kubeopenapi-jsonschema -r "./node_modules/**/*"
15 |
16 | alpine: alpine-arm
17 | nexe index.js -t alpine-x64 -o kubeopenapi-jsonschema -r "./node_modules/**/*"
18 |
19 | #
20 | # ARM SUPPORT
21 | #
22 | darwin-arm:
23 | nexe index.js -t arm64 --build -o kubeopenapi-jsonschema-darwin -r "./node_modules/**/*"
24 |
25 | linux-arm:
26 | nexe index.js -t arm64 --build -o kubeopenapi-jsonschema -r "./node_modules/**/*"
27 |
28 | windows-arm:
29 | nexe index.js -t windows-arm64 --build -o kubeopenapi-jsonschema -r "./node_modules/**/*"
30 |
31 | alpine-arm:
32 | nexe index.js -t alpine-arm64 --build -o kubeopenapi-jsonschema -r "./node_modules/**/*"
33 |
34 | .PHONY: darwin darwin-arm alpine alpine-arm linux linux-arm
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # KubeOpenAPI - JSON Schema
2 |
3 | This is a very basic node based CLI for converting OpenAPI schema to JSON Schema Draft 4
4 |
5 |
6 | ```
7 | Usage: kubeopenapi-jsonschema [options]
8 |
9 | Options:
10 | -t, --type [type] set type of input, can be either yaml or json (default: "yaml")
11 | -l, --location location of the schema
12 | -f, --filter [query] give a query if a OpenAPISchema is nested
13 | --kubernetes enable kubernetes specific filters (default: false)
14 | -o [output-format] output format (default: "json")
15 | --o-filter [output-filter] output filter query
16 | --silent skip output (default: false)
17 | --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: "")
18 | -h, --help display help for command
19 | ```
20 |
21 | ## Example
22 |
23 | Download the binaries from the github releases. Only linux-x64, darwin-x64 and windows-x64 binaries are released
24 |
25 | ```bash
26 | kubeopenapi-jsonschema --location ./k8s.json -f '$.definitions' -t json --o-filter '$[0][?(@["x-kubernetes-group-version-kind"][0].kind=="Deployment")].properties.spec' --resolve "$"
27 | ```
28 |
29 | The above will consume kubernetes open API schema and will produce schema for Kubernetes `Deployment`
30 |
31 |
32 | ```bash
33 | kubeopenapi-jsonschema --location ./istio.yaml -t yaml --filter '$[?(@.kind=="CustomResourceDefinition")]..schema.openAPIV3Schema.properties.spec' --o-filter '$'
34 | ```
35 |
36 | The above will consume istio CRD manifest and will produce schema for all of the CustomResourceDefinition objects
37 |
38 |
39 |
40 | ## Join the Community!
41 |
42 |
43 | 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!
44 |
45 |
46 |
47 |
Find your MeshMate
48 |
49 |
MeshMates are experienced Layer5 community members, who will help you learn your way around, discover live projects and expand your community network.
50 | Become a Meshtee today!