Propose add required to schema constructor
See original GitHub issueFor a put request model require of id
field, but for post request id
not needed. For disabling in a post request I use dump_only=["id"]
, but I have not found such a way to do id
required. For this reason, I suggest adding required
to the schema constructor.
Issue Analytics
- State:
- Created 4 years ago
- Comments:30 (12 by maintainers)
Top Results From Across the Web
Make all fields required in Mongoose - node.js - Stack Overflow
Probably the cleanest way to do this is by wrapping mongoose. Schema with a decorator and building this constructor yourself.
Read more >Extending Schemas — marshmallow 3.19.0 documentation
You can specify a custom error-handling function for a Schema by overriding the handle_error method. The method receives the ValidationError and the original ......
Read more >Schema Builder Text Area Issues - Salesforce Developers
I got the Solution for this. User-added image. You have to update the object name field from properties to Propety only,. Good Luck....
Read more >Proposal for restricting property names - Google Groups
In the second JSON Schema draft, the only way to place a restriction on the name of a property is if the name...
Read more >Model | LoopBack Documentation
The @model decorator can take jsonSchema to customize the JSON schema inferred for ... we require the use of the @property.array decorator, which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your use case can be achieved by using a separate schema for POSTs vs PUTs.
In my APIs, I use the same schema but the ID for the PUT is in the URL, so it is injected in the view func (by webargs) as a path parameter.