3 ms·
Isn't this what http://json-schema.org http://json-schema.org aims to provide? Or am I missing something. It's a solid spec.
by feralmoan 14y ago
Isn't this what http://json-schema.org http://json-schema.org aims to provide? Or am I missing something. It's a solid spec.
- ayushgta 14y agoJson Schema is pretty good at describing data coming through JSON. But describing (REST) APIs requires more. For example a standard way to describe API endpoints with parameters and response types, errors, related models, default/allowable values etc. This was what the OP was referring to and this is what Swagger is trying to do. The Swagger Spec is here with some more details on whats required in addition to JSON Schema to document APIs: https://github.com/wordnik/swagger-core/wiki/API-Declaration https://github.com/wordnik/swagger-core/wiki/API-Declaration Incidentally model/data specifications in swagger spec does map closely with json schema.
- stephen 14y agoPersonally I'm partial to http://jschema.org/ http://jschema.org/ (also see http://jschema.org/rpc.html http://jschema.org/rpc.html) because it seems simpler. My naive impression is that JSON-Schema is trying to be just like XML Schema, but in JSON. Which doesn't seem like a good thing.
- rozap 14y agoBut neither of these are geared towards a RESTful implementation, unless I'm missing something.