A Monorepo of various packages to power OpenAPI in node.
Quick Start Express
- See express-openapi
Quick Start Koa
- See koa-openapi
Note: One of the goals of this monorepo is to support independent package versions. The author has used other popular options out there (like lerna), and has found independent versioning to behave strangely with them. Another goal with the current approach is to reduce boilerplate code as much as possible (something tools like lerna don't help with). The inspiration for the current approach came from boennemann/alle. The author isn't married to the current approach, so if you have ideas on how to simplify the development of this monorepo by all means please open an issue.
Typical Workflow for Contributors
Let's say you're working on a package under ./packages. Here's what you do:
- Make your changes.
- Do not bump the version in package.json. A maintainer will handle that once your PR is merged.
- Once you're satisfied with your changes:
- Create a new branch
git checkout -b my-branch(in case you haven't done so already).
./bin/commit packages/<package_you're_working_on> 'commit message describing your change. can be multi line here. just close with a single quote like so:'
- Push your change to your fork
- Open a PR.
Several scripts have been created to aid in the development of this monorepo (see ./bin). They assume that your
$PWD is the root of the repository. Here is a brief summary of common actions:
npm iin the package prior to running the tests)
- Test a single package -
./bin/test packages/<package_to_test>(starts the test in watch mode)
- Test all packages -
- Commit changes to a package -
./bin/commit packages/<package_to_commit> 'Commit message'(the commit message will be prepended with the package name e.g.
<package_to_commit>: Commit message
Scripts in this directory wrap common tools, like
mocha. They reduce boilerplate and are called from npm scripts.
The MIT License (MIT) Copyright (c) 2018 Kogo Software LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.