Default values missing in query
See original GitHub issueFirst of all, thanks a lot for this package @cdimascio
I couldn’t find any other lib that handles OpenAPI v3 well, is well maintained and has a good amount of tests 😄
So here’s my issue: For example, I’m using this schema:
Sort:
properties:
field:
default: id
enum:
- id
type: string
order:
default: ASC
enum:
- ASC
- DESC
type: string
type: object
Along with this query item:
parameters:
- in: query
name: sort
required: false
schema:
$ref: '#/components/schemas/Sort'
style: deepObject
Then, inside the route, the req.query.sort
is an empty object instead of the default values, { sort: {field: 'id', order: 'ASC'} }
Is the not the desired behaviour or is it because of the deepObject
style?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Default value in a Query variable is missing - SAP Community
A variable screen with default Hierarchy value is being populated where user has an option to select a Hierarchy of his choice from...
Read more >How to show missing rows with default values
This table has missing rows for a few months. I would like to query and show this data as well. So I created...
Read more >Default Values missing for Report Parameters - MSDN
We started getting this error message when trying to run a report that relies on default parameter values based on queries: "The report...
Read more >How to fill in missing rows in a table with default values in sqlite
For this query: select a.a, b.b, coalesce(c.c, 0) from (select distinct a from table) a cross join (select distinct b from table) b...
Read more >How to replace null entries with default values in SQL
In SQL, we can use two functions to replace null entries with a default value. These functions are COALESCE() and ISNULL() . We'll...
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
Works perfectly fine! Thanks @cdimascio 😄
Yes. Its already available. Let me know how it goes