Skip to content

feat: better support for additional properties - #57

Merged
mnahkies merged 7 commits into
masterfrom
mn/44/additionalProperties
Apr 23, 2023
Merged

feat: better support for additional properties#57
mnahkies merged 7 commits into
masterfrom
mn/44/additionalProperties

Conversation

@mnahkies

Copy link
Copy Markdown
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
@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.

1 participant