-
Notifications
You must be signed in to change notification settings - Fork 14
Contributing
Note
|
This page describes how developers who wish to contribute to openapi-cop can set up the project quickly on their local machine. |
Note
|
Make sure you have also checked the contributing guidelines before you keep on reading. |
First, clone the repository
git clone https://github.com/EXXETA/openapi-cop
If you are using NVM, switch to the suggested Node.js version (taken from the .nvmrc file)
nvm use
Install the dependencies
npm install
This list is non-exhaustive:
-
📁 src/ — source files.
-
📁 docker/ — files related to the publishable Docker image.
-
📁 mock-server/ — mock target server useful for testing and development.
The mock will take the example objects from a given OpenAPI document to generate responses. You can feed it with a different OpenAPI document than openapi-cop to test validation of responses.
-
📁 test/
-
📄 01.unit.test.ts/ — tests ability to read valid OpenAPI files.
-
📄 02.integration.test.ts/ — tests validation of requests/responses with different configurations against mock servers.
-
📁 schemas/ — OpenAPI documents used in tests * 📁 *test-requests/ and test-responses/ — contains test data covering requests/responses relative to files from schemas/. Tests in 02.integration.test.ts will use this data.
-
📁 docker/ — contains a Docker setup in which tests can be run.
-
-
📁 types/ — custom TypeScript types * 📁 docs/ — documentation resources.
See the guide found in Tests.