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

oneOf not included inside of array #926

Closed
kennethaasan opened this issue Feb 28, 2024 · 1 comment · Fixed by #927
Closed

oneOf not included inside of array #926

kennethaasan opened this issue Feb 28, 2024 · 1 comment · Fixed by #927
Labels

Comments

@kennethaasan
Copy link
Contributor

kennethaasan commented Feb 28, 2024

Description

oneOf is not included inside of array.

Expected result

The oneOf part of the schema is visible inside arrays.

Actual result

Screenshot 2024-02-28 at 15 41 00

As you can see, when Game is used inside an array, it's missing the oneOf part (Adheres to Game.Regular and Or to Game.TieBreak).

Steps to reproduce

asyncapi: 2.6.0
info:
  title: Test
  version: 1.0.0
channels: {}
components:
  messages:
    state:
      payload:
        title: State
        type: object
        properties:
          sets:
            title: Sets
            type: array
            items:
              title: Set
              type: object
              properties:
                games:
                  title: Games
                  type: array
                  items:
                    "$ref": "#/components/schemas/game"
          game:
            "$ref": "#/components/schemas/game"
  schemas:
    game:
      title: Game
      type: object
      discriminator: type
      properties:
        type:
          title: Game.Type
          type: string
          enum:
          - REGULAR
          - TIE_BREAK
      oneOf:
      - title: Game.Regular
        type: object
        properties:
          type:
            const: REGULAR
      - title: Game.TieBreak
        type: object
        properties:
          type:
            const: TIE_BREAK

Troubleshooting

I've already checked the parser, and I don't see any issues. And because this library with playground doesn't work on my Mac with node.js v18 I'm not able to make a PR...

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.4.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants