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

feat: better support for additional properties #57

Merged
merged 7 commits into from
Apr 23, 2023

Conversation

mnahkies
Copy link
Owner

  • adjust normalization of additionalProperties on input to support
    schemas

  • adjust type builder to output a union when additionalProperties is
    declared, where the type remains unknown when set to true, but uses
    the schema type otherwise. The union is required since otherwise the
    index type might conflict with other declared properties

  • begin incremental adoption of prettier in the codebase, I've been
    putting it off to try and keep diff's more readable, but think it's
    time

  • replace inline {[key: string]: never } type with a static EmptyObject type to
    better communicate the intention

mostly solves #44 although currently the schema builder completely ignores additionalProperties meaning that they won't work correctly for the koa template yet

- adjust normalization of additionalProperties on input to support
  scheamas

- adjust type builder to output a union when additionalProperties is
  declared, where the type remains unknown when set to true, but uses
  the schema type otherwise

- begin incremental adoption of prettier in the codebase, I've been
  putting it off to try and keep diff's more readable, but think it's
  time

mostly solves #44
@mnahkies mnahkies enabled auto-merge (squash) April 23, 2023 07:54
@mnahkies mnahkies merged commit e69881b into master Apr 23, 2023
2 checks passed
@mnahkies mnahkies deleted the mn/44/additionalProperties branch April 23, 2023 07:56
mnahkies added a commit that referenced this pull request Apr 23, 2023
- obtained from https://github.com/stripe/openapi

- licensed as MIT
(https://github.com/stripe/openapi/blob/master/LICENSE)
  although this is currently missing from the specification itself
  (see stripe/openapi#120)

surfaced numerous issues that are now fixed:
- #50
- #55
- #56
- #57
- #58
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

Successfully merging this pull request may close these issues.

None yet

1 participant