Skip to content

The type provider 'SwaggerProvider.OpenApiClientTypeProvider' reported an error: Schema parse errors: Invalid Reference identifier 'JWT' #263

Closed

Description

@hotyes

I encountered an error while using for this document https://plisio.net/swagger/api

The type provider 'SwaggerProvider.OpenApiClientTypeProvider' reported an error: Schema parse errors:
Invalid Reference identifier 'JWT'. @F# Compiler[3033](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/compiler-messages/fs3033)
type OpenApiClientProvider
An error occurred when parsing the doc comment, please check that your doc comment is valid.

More info can be found in the LSP output

[Open the documentation](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)

Anyone have any idea for the solution ?

Activity

  1. Thorium commented on May 10, 2025

    @Thorium
    Member

    I would expect this to come from the external library (Microsoft.OpenApi) schema parsing.
    There is now PR to update that library, but if it won't work after that, then it's probably an issue for them (or for the schema owner).

  2. hotyes commented on May 11, 2025

    @hotyes
    Author

    hmm, updated to the latest version (v2.3.0) doesn't work, anyway thanks

  3. sergey-tihon commented on May 11, 2025

    @sergey-tihon
    Member

    i also believe that it is the schema issue

    schema defines 2 security schemas

    Image

    but "/payment-button/new/{hash}" uses undefined JWT schema

    Image

    more here https://swagger.io/docs/specification/v3_0/authentication/

  4. Thorium commented on May 11, 2025

    @Thorium
    Member

    It seems schemas are "best effort" of creator and rarely without mistakes.

    On schema errors I recommend:

    1. save the schema to your file system and fix the issue locally.
    2. report the issue or send PR to schema owner.

    It's a good practice to use local file anyway, because the schema owner may just take their schema file off from the internet, e.g. if they fear misuse or hacking.

  5. hotyes commented on May 12, 2025

    @hotyes
    Author

    greats idea, thank you guys!

  6. github-actions commented on Mar 17, 2026

    @github-actions
    Contributor

    🤖 This is an automated response from Repo Assist.

    The root cause (invalid JWT security scheme reference in the schema itself) was correctly identified by @sergey-tihon and @Thorium above.

    As an additional workaround for cases where fixing the upstream schema isn't practical: since v2.3.0 the provider supports an IgnoreParseErrors=true static parameter that lets you continue past validation errors:

    type Api = OpenApiClientProvider<"(plisio.net/redacted), IgnoreParseErrors=true>

    Errors are printed to stderr so you can still see what was ignored. You can also inspect them at runtime via the new SchemaReaderErrors property (coming in the next release — see PR in progress).

    The best long-term fix remains reporting the schema error to the Plisio team, but IgnoreParseErrors=true gets you unblocked immediately.

    Generated by Repo Assist · ◷

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions