ajv-validator / ajv-validator/ajv-formats
uri-reference ?
- 主要語言
- TypeScript
- 星號
- 228
- 分支
- 42
- PR 合併指標
- 30 天內沒有已合併 PR
描述
hi,
The current format for uri-reference declares a fragment like `#/paths/~1{id}/get/responses/404` invalid.
The fragment is considered valid if the curly braces are percent encoded as %7B and %7D.
I use AJV to validate openApi specs, and out of about 2300 real world specs about 7 fail because they have uri-reference with curly braces.
RFC 3986 is not very strict on what to encode and what not.
The What-wg url spec is more formal and [states](https://url.spec.whatwg.org/#percent-encoded-bytes):
>The C0 control percent-encode set are the C0 controls and all code points greater than U+007E (~).
>The fragment percent-encode set is the C0 control percent-encode set and U+0020 SPACE, U+0022 ("), U+003C (<), U+003E (>), and U+0060 (`).
This would allow curly braces as valid.
Should AJV-formats follow the What-wg spec?
Kind regards,
Hans
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。