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

Schemas don't have the right order of key value pairs #536

Open
Amit0617 opened this issue Apr 23, 2024 · 1 comment
Open

Schemas don't have the right order of key value pairs #536

Amit0617 opened this issue Apr 23, 2024 · 1 comment

Comments

@Amit0617
Copy link

I am working on some tooling over execution APIs where rendering of docs happening through Openapi schema.
I was taking transactions definition as defined in this repository.

There are some issues:

  • There is nothing like
    type: 'null'
    rather it should be
    nullable: true
  • title is defined before using $ref which results in local title to be replaced with title value inside $ref. So, to overwrite title value from $ref, it should be defined after $ref key.
  • Also neighbour items of $ref get ignored and they are required to be wrapped under allOf.
    Example
    -         nonce:
    -          title: nonce
    -          $ref: '#/components/schemas/uint'
    +         nonce:
    +          allOf:
    +           - $ref: "#/components/schemas/uint"
    +           - title: nonce

Following are comparisons of both rendered
Before: where local title values are coming from $ref component
2024-04-23-17-34-05

After: where desired title values are getting rendered
2024-04-23-17-45-17

@Amit0617
Copy link
Author

I will be doing all the changes necessary for own tooling docs. If this feels like an issue here, I would open a PR with required changes.

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

No branches or pull requests

1 participant