fern
fern copied to clipboard
Fern linter should treat scheme in securityScheme Object as case-insensitive
Which Fern component?
Fern CLI
How urgent is this?
P3 - Low (Nice to have)
What's the issue?
- Steps to reproduce
- Initialize a fern project with an OpenAPI file that has a security scheme with
type: http, scheme: Bearer. Make sure to capitalize the "B" in "Bearer". - Run
fern check
- Expected behavior
- No errors reported, because the value of the
schemefield is case-insensitive. This is per RFC 7235 Section 2.1 and was clarified in the recent 3.0.4 and 3.1.1 point releases of the spec [ref].
- Actual behavior
fern checkissues this message:
[api]: Failed to convert security scheme {"type":"http","scheme":"Bearer"}
but if the value of scheme is changed to "bearer", fern check completes with no errors
4. Environment
- Docker container: mcr.microsoft.com/devcontainers/dotnet:1-8.0 inside VSCode
Workaround
Use scheme: bearer with lowercase "b".
Logs & Additional Context
No response
I’m going to take a look at this now. I’ll keep the change focused on making HTTP security scheme matching case-insensitive, and I’ll check the OpenAPI 3.0 path since the 3.1 converter already lowercases scheme.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.