schema
openapi-cop
schema | openapi-cop | |
---|---|---|
1 | 1 | |
2 | 370 | |
- | 0.0% | |
0.0 | 0.0 | |
about 2 years ago | 13 days ago | |
TypeScript | ||
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
schema
-
Testing in production: using JSON Schema for 3rd party API response validation
> As a side note, what do people think about JSON schema? I find it quite verbose and cumbersome
Agreed. But if you want to have validation and autocompletion in most editors, it is still the way to go. We use it to validate JSON content files for a CMS [1]. It is a little repetitive in our case (e.g. the `:name`/`:description` keys are repeated), but not that bad. Newer versions of JSON Schema [2] have improved in that respect, but most editors (or plugins) and tooling in general is still based on older versions. So we have to stick with those for a while.
[1] https://github.com/frontaid/schema/blob/master/frontaid-sche...
[2] https://json-schema.org/specification.html
If you have to deal with JSON a lot, you might want to checkout https://www.schemastore.org/json/ which has schemas for a large number of file types.
openapi-cop
-
Testing in production: using JSON Schema for 3rd party API response validation
Json schema validation is cpu expensive in nodejs, so you do not want it in production for every request. We made a proxy [1] that only allows requests that are conform to the swagger json which is easy to hook between frontend and backend in dev-mode
[1] https://github.com/EXXETA/openapi-cop
What are some alternatives?
typebox - Json Schema Type Builder with Static Type Resolution for TypeScript
Superstruct - A simple and composable way to validate data in JavaScript (and TypeScript).
typescript-json-validator - Automatically generate a validator using JSON Schema and AJV for any TypeScript type.
ts-json-schema-generator - Generate JSON schema from your Typescript sources
portman - Port OpenAPI Specs to Postman Collections, inject test suite and run via Newman 👨🏽🚀
iglu-central - Contains all JSON Schemas, Avros and Thrifts for Iglu Central
Snowplow - The leader in Next-Generation Customer Data Infrastructure