SwaggerProvider
SwaggerProvider copied to clipboard
The type provider 'SwaggerProvider.OpenApiClientTypeProvider' reported an error: Schema parse errors: Invalid Reference identifier 'JWT'
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 ?
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).
hmm, updated to the latest version (v2.3.0) doesn't work, anyway thanks
i also believe that it is the schema issue
schema defines 2 security schemas
but "/payment-button/new/{hash}" uses undefined JWT schema
more here https://swagger.io/docs/specification/v3_0/authentication/
It seems schemas are "best effort" of creator and rarely without mistakes.
On schema errors I recommend:
- save the schema to your file system and fix the issue locally.
- 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.
greats idea, thank you guys!