3 ms·
JSONSchema is good for this IME. It can model 99.9% of usual models, supports generation & validation for most major languages. It's also part of OpenAPI, usefu
by kitd 2y ago
JSONSchema is good for this IME. It can model 99.9% of usual models, supports generation & validation for most major languages. It's also part of OpenAPI, useful if you expand your modelling to REST APIs.
https://json-schema.org/implementations https://json-schema.org/implementations
- moneywoes 2y agohow can i auto generate api code with this
- kitd 2y agoYou would use OpenAPI (formerly Swagger) [1] for that, which includes JSONSchema for data types but also adds specs for defining REST apis. There are plenty of generators and other tools that work with OpenAPI [2] [1] https://www.openapis.org/ https://www.openapis.org/ [2] https://openapi-generator.tech/ https://openapi-generator.tech/