drf-json-schema
drf-json-schema copied to clipboard
Generate schema from serializer
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.
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.)