drf-json-schema icon indicating copy to clipboard operation
drf-json-schema copied to clipboard

Generate schema from serializer

Open zbyte64 opened this issue 8 years ago • 1 comments

Currently a serializer needs to specify a schema in order for the renderer to work. Wouldn't it be nice if it generated a schema (like what DRF does with coreapi) if none was associated? Let me know if this aligns with the project goals and if there are any special considerations to be made.

zbyte64 avatar Oct 17 '17 20:10 zbyte64

Auto-generating the schema based on the serializer would definitely be cool, and certainly aligns with the project goals -- it's something I'd love to see. The only special consideration would be that it continues to allow the parser and renderer to work without Django models or ModelSerializers.

Ideally I'd like to have the schema class be independent from both Serializers and DRF itself, so it's more easily unit tested (and could theoretically be used outside of DRF, but that's a long term wish.)

paulcwatts avatar Oct 18 '17 15:10 paulcwatts