fern icon indicating copy to clipboard operation
fern copied to clipboard

Fern linter should treat scheme in securityScheme Object as case-insensitive

Open mikekistler opened this issue 1 year ago • 2 comments

Which Fern component?

Fern CLI

How urgent is this?

P3 - Low (Nice to have)

What's the issue?

  1. 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
  1. Expected behavior
  • No errors reported, because the value of the scheme field 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].
  1. Actual behavior
  • fern check issues 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

mikekistler avatar Feb 18 '25 14:02 mikekistler

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.

shubhamsinnh avatar May 24 '26 04:05 shubhamsinnh

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.

github-actions[bot] avatar Nov 21 '26 01:11 github-actions[bot]