Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$sort error #14

Open
alechko opened this issue Oct 31, 2021 · 0 comments
Open

$sort error #14

alechko opened this issue Oct 31, 2021 · 0 comments

Comments

@alechko
Copy link

alechko commented Oct 31, 2021

Hi, I'm trying to figure out how to use $sort, when I use it like this:

/resource?$sort=field

I'm getting error:

"res":{"statusCode":400},"err":{"type":"Error","message":"querystring.$sort should be equal to one of the allowed values","stack":"Error: querystring.$sort should be equal to one of the allowed values\n    at defaultSchemaErrorFormatter

...


fastify/lib/hooks.js:181:3)","validation":[{"keyword":"enum","dataPath":".$sort","schemaPath":"#/properties/%24sort/enum","params":{"allowedValues":["ASC","DESC","asc","desc"]},"message":"should be equal to one of the allowed values"}],"validationContext":"querystring"},"msg":"querystring.$sort should be equal to one of the allowed values"}

Is there something I'm missing?


node -v: v16.10.0

"fastify": "^3.6.0"
"@fastify-resty/core": "^0.3.0"
"@fastify-resty/typeorm": "^0.3.0"
"typeorm": "^0.2.28"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant