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

Allow + in search param of word registry #368

Closed
davidyuk opened this issue Jul 7, 2021 · 0 comments · Fixed by #376
Closed

Allow + in search param of word registry #368

davidyuk opened this issue Jul 7, 2021 · 0 comments · Fixed by #376
Assignees

Comments

@davidyuk
Copy link
Member

davidyuk commented Jul 7, 2021

Current behavior:

$ curl https://testnet.superhero.aeternity.art/tokenCache/wordRegistry\?search\=yatt+2
{"message":"Parameter 'search' must be url encoded. Its value may not contain reserved characters.","errors":[{"path":".query.search","message":"Parameter 'search' must be url encoded. Its value may not contain reserved characters."}]}%

Seems that it is correct to use + in query, at least URL class encodes it this way:

const u = new URL('https://testnet.superhero.aeternity.art/tokenCache/wordRegistry');
u.searchParams.set('search', 'yatt 2');
u.toString();
// 'https://testnet.superhero.aeternity.art/tokenCache/wordRegistry?search=yatt+2'

as a workaround proposing to set allowReserved: true as proposed in cdimascio/express-openapi-validator#300

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

Successfully merging a pull request may close this issue.

2 participants