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

Support for anyOf/minProperties for required schema properties. #976

Open
tyler-mairose-sp opened this issue Sep 23, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@tyler-mairose-sp
Copy link
Contributor

Describe the bug

Given the following schema the generated page does not properly render and instead gives an error:

Docusaurus error: the <Tabs> component requires at least one <TabItem> children component
post:
  tags:
  - Suggested Entitlement Description
  operationId: submitSedBatchRequest
  summary: Submit Sed Batch Request
  description: 'Submit Sed Batch Request.

    Request body has one of the following:
      - a list of entitlement Ids
      - a list of SED Ids
    that user wants to have description generated by LLM. 
    API responses with batchId that groups Ids together'
  requestBody:
    description: Sed Batch Request
    content:
      application/json:
        schema:
          description: Sed Batch Request
          type: object
          anyOf:
            - required: [entitlements]
            - required: [seds]
          properties:
            entitlements:
              description: list of entitlement ids
              type: array
              items:
                type: string
                example: 016629d1-1d25-463f-97f3-c6686846650
            seds:
              description: list of sed ids
              type: array
              items:
                type: string
                example: 016629d1-1d25-463f-97f3-c6686846650

Expected behavior

Request body should display and show that you must specific either an array of entitlements or an array of sed ids.

Current behavior

I receive the error above, I believe this is because the plugin is not accounting for this use-case in open api specification.

Possible solution

Steps to reproduce

Create a schema with the use of anyOf property to denote that you must include either property.

Screenshots

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): Node v20.9.0
  • Operating System and version (desktop or mobile): MacOS Sonoma 14.7
  • Link to your project:
@tyler-mairose-sp tyler-mairose-sp added the bug Something isn't working label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant