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

Honour @id directive on type fields #60

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

danielfinke
Copy link
Contributor

Issue #, if available: #59

Description of changes:

When the @id directive was specified on a field, it was ignored by schemaModelValidator which added a new ID field, resulting in 2 ID fields.

Now, the directive inference checks for the existence of an ID field before adding the default one.

  • break out logic around ID/input fields into dedicated functions
  • better inlining of input fields and values

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

When the `@id` directive was specified on a field, it was ignored by
`schemaModelValidator` which added a new ID field, resulting in 2 ID
fields.

Now, the directive inference checks for the existence of an ID field
before adding the default one.

- break out logic around ID/input fields into dedicated functions
- better inlining of input fields and values

closes aws#59
@kmcginnes
Copy link
Contributor

Looks good to me!

+1

@andreachild
Copy link
Contributor

LGTM

Copy link
Contributor

@Cole-Greer Cole-Greer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @danielfinke

@Cole-Greer Cole-Greer merged commit 9a3de7f into aws:main Jan 27, 2025
2 checks passed
@danielfinke danielfinke deleted the id-directive-ignored branch January 27, 2025 23:35
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.

4 participants