Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore unknown vendor extensions #891

Open
tjperry07 opened this issue Jul 17, 2024 · 1 comment
Open

Ignore unknown vendor extensions #891

tjperry07 opened this issue Jul 17, 2024 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@tjperry07
Copy link
Contributor

Is your feature request related to a problem?

My API contains custom vendor extensions so it does certain actions as part of the build. The plugin should ignore or skip any it doesn't know.
(I wasn't sure if this was a bug or enhancemenmt)

For example:

"x-coa-command-group": "nodes",

I have to remove them each time, otherwise I get an error like:

> docusaurus gen-api-docs all

Loading of api failed for "/Users/tatiana/Documents/coalesce-docs/static/api/coalesce-api.json"

[ERROR] TypeError: Cannot create property 'description' on string 'nodes'
    at createItems (/Users/tatiana/Documents/coalesce-docs/node_modules/docusaurus-plugin-openapi-docs/lib/openapi/openapi.js:109:45)
    at processOpenapiFile (/Users/tatiana/Documents/coalesce-docs/node_modules/docusaurus-plugin-openapi-docs/lib/openapi/openapi.js:511:19)
    at async /Users/tatiana/Documents/coalesce-docs/node_modules/docusaurus-plugin-openapi-docs/lib/openapi/openapi.js:464:35
    at async Promise.all (index 0)
    at async processOpenapiFiles (/Users/tatiana/Documents/coalesce-docs/node_modules/docusaurus-plugin-openapi-docs/lib/openapi/openapi.js:475:22)
    at async generateApiDocs (/Users/tatiana/Documents/coalesce-docs/node_modules/docusaurus-plugin-openapi-docs/lib/index.js:95:44)
    at async /Users/tatiana/Documents/coalesce-docs/node_modules/docusaurus-plugin-openapi-docs/lib/index.js:439:15
[INFO] Docusaurus version: 3.4.0

Describe the solution you'd like

Ignore the unknown vendor extensions. Don't try to process or do anything with them.

Describe alternatives you've considered

None, I need them for code generation for the company app. I can't take them out.

Additional context

If left in, I get error messages and the reference won't generate.

@tjperry07 tjperry07 added the enhancement New feature or request label Jul 17, 2024
@sserrata
Copy link
Member

Hi @tjperry07, can you provide a copy or example snippet that can be used to reproduce the error? Thanks!

@sserrata sserrata added the question Further information is requested label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants