@@ -30,9 +30,37 @@ series [How to Contribute to an Open Source Project on GitHub][egghead]
3030
3131Please make sure to run the tests (`npm test`) before you commit your changes.
3232
33+ ### Local schemas
34+
35+ This repo supports OpenAPI 2.0 and 3.0. There are some real-world examples
36+ located in `tests/v2/specs/*.yaml` and `tests/v3/specs/*.yaml`, respectively.
37+ Testing large, real schemas was a major goal of this project. Many libraries
38+ only test the “Petstore” example from Swagger, which is contrived and is
39+ missing much complexity from companies’ production schemas.
40+
41+ _Note: don’t update the `yaml` schemas with your own custom additions (but if
42+ the official versions have updated, then it’s fine to upadte them here). If
43+ you’d like to add your schema for testing, then please add them as a new
44+ schema, and add them to `./expected/*.ts`._
45+
46+ #### Regenerating schemas
47+
48+ If you’ve added a feature or fixed a bug and need to update the generated schemas, run the following:
49+
50+ ```
51+ # 1. re-build the package
52+ npm run build
53+ # 2. run the local CLI (not the npm one!)
54+ pkg/bin/cli.js tests/v3/specs/github.yaml -o tests/v3/expected/github.ts
55+ ```
56+
57+ This should update the expected TypeScript definiton.
58+
59+ _Also if this appears in `examples/` feel free to update that, too!_
60+
3361## Help needed
3462
35- Please checkout the [the open issues][issues]. Issues labelled [**Help
63+ Please check out the [the open issues][issues]. Issues labelled [**Help
3664Wanted**][help-wanted] and [**Good First Issue**][good-first-issue] are
3765especially good to help with.
3866
0 commit comments