[openapi-default-setter] Populate defaults in request body
See original GitHub issueBreaking out into a separate issue from https://github.com/kogosoftwarellc/open-api/pull/398#issuecomment-478292795
The openapi-default-setter package does not support setting defaults in the request body. Ajv (which is used by openapi-request-validator) has a useDefaults
option, but it sounds like adding support for setting body defaults in the openapi-default-setter package is preferred.
Thoughts on where to begin or prior art to take inspiration from?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Describing Request Body - Swagger
Request bodies are typically used with “create” and “update” operations (POST, ... OpenAPI 3.0 provides the requestBody keyword to describe request bodies.
Read more >open-api/index.ts at master - GitHub
A Monorepo of various packages to power OpenAPI in node - open-api/index.ts at master · kogosoftwarellc/open-api.
Read more >handle Null and Default values in @RequestBody with Jackson
Your DTO will be populated by Jackson with the fields your JSON contains. The other fields will simply be null; that is the...
Read more >express-openapi - npm
Leverages openapi parameter lists for parameter defaults, type coercion, and validation. See openapi-default-setter; See openapi-request- ...
Read more >How not to make a framework for default request values in ...
How to make dynamic Spring default values for composite objects input into a REST ... Request body collection into a custom object
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
i’m OK changing the options we pass to the contructor/methods, i’m just not ok coupling the interfaces herein with ajv directly wherever possible
yes