paulcwatts / drf-json-schema Goto Github PK
View Code? Open in Web Editor NEWExtensible JSON API schema for Django Rest Framework
License: MIT License
Extensible JSON API schema for Django Rest Framework
License: MIT License
http://json-schema.org/
Your just using the same name...?
Since Django 3.8, a Django application needs to have a full Python path and unique across the project. [1]
Basic repro (write up a unit test):
What actually happens is they are ignored, because the JSONAPILimitOffsetPagination class ignores them when it wraps the data in a paginated output.
Perhaps consider an easier way to attach links, like allowing UrlLink() objects in a subclass of the renderer and generic 'render_links' or 'render_meta' in the renderer, similar to the way we allow for ResourceObjects. Alternatively, try to find a way to get something like this from the schema? That would centralize all of the links and meta handling in the schema, which would be useful.
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.
If you set a serializer field as write_only
, DRF doesn't include it in the serializer data. However, the Schema object expects that all fields that are specified in the attributes
and relationships
lists appear in the serializer data. This causes a KeyError
to be thrown in Schema.render_attributes
.
Support write_only
attributes by ignoring the attribute or relationship if it's not in the data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.