Comments (1)
It could be easy enough to just the annotation to the TYPES list in fields but the tricky bit is mimicking Django validator behavior. Django's default behavior is debatable too though, as it will accept FTP URLs and IPs which many people might not want.
Maybe the more complete solution is to be able to declare a Pydantic type annotation on a custom Django Field, then it could get reused automatically everywhere. It would also provide a path for third-party libraries that implement their own fields to improve their out-of-box support with Ninja.
from django-ninja.
Related Issues (20)
- Static Method Not Reflecting Instance-Specific Argument in Dynamically Created ModelSchema Class
- [BUG] `fields_optional="__all__"` causes TypeError on models with a field using the `default` parameter
- [BUG] `SmallAutoField` missing from `ninja.orm.fields` HOT 1
- Add Redoc Try It Out feature
- Adding the schema for "unauthorized" to the OpenAPI
- The CSRF header name needs to be configurable HOT 2
- create_schema w/ depth: Support ReverseManyToOneDescriptor
- Make `csrf=True` add `X-CSRFToken` header parameters to OpenAPI spec HOT 2
- Docs not updated? HOT 4
- [BUG] Cannot use Django's Test Client when Ninja TestClient is used in a pytest suite
- Allow optional fields to be marked as required in `ModelSchema`
- [BUG] Self-Referencing Schemas are Broken HOT 1
- How to implement a generic Filter HOT 1
- [BUG] URL path recognition error when get request comes first and post request comes later
- can you implement websocket for ninja api.
- Documentation of responses with schemes in openapi_extra
- [BUG] ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard' on python 3.12.4
- [BUG] Endpoint payload cannot be an Annotated Union with Discriminator
- Returning alternate response objects HOT 1
- [BUG] mypy crashes with django-ninja installed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-ninja.