Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Ignore unknown vendor extensions

Đang mở
#891 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
openapi, typescript
Lĩnh vực
documentation, tooling

Hướng nghiên cứu

Start with lib/openapi/openapi.js, especially createItems and processOpenapiFile, using the docusaurus gen-api-docs all reproduction. Verify that x-coa-command-group and other unknown x-* values no longer fail generation while standard OpenAPI fields are still processed. The payload does not name a test file, so locate the relevant coverage before validating the change.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement question
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.

Ngôn ngữ chính
TypeScript
Star
1.1k
Fork
317
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PaloAltoNetworks/docusaurus-openapi-docs

Tất cả issue của PaloAltoNetworks/docusaurus-openapi-docs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.