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

Enum QoL Features #173

Merged
merged 13 commits into from
May 3, 2022
Merged

Enum QoL Features #173

merged 13 commits into from
May 3, 2022

Conversation

Blacksmoke16
Copy link
Member

@Blacksmoke16 Blacksmoke16 commented May 1, 2022

  • Add an argument resolver that handles resolving enum members based on the request value
    • Handles both numeric and string based conversion
  • Introduce ART::Requirement::Enum to make defining route requirements easier for enums
  • (breaking) Replace ASPEC::Methods.assert_error to leverage non-file version
    • Update ATH and ADI compiler specs to use it
  • Remove is_nilable property from ArgumentMetadata
    • This can always be inferred from T
  • Add methods to ArgumentMetadata to allow determining if it is an "instance of" another type as well as returning the first type that matches the provided metaclass
  • (breaking) Return underscored strings by default when serializing enums

Add value resolver for enum types
Also add `assert_success`
Refactor enum value resolver to not use macros
@Blacksmoke16 Blacksmoke16 added component:framework component:routing kind:enhancement New functionality to an existing feature labels May 1, 2022
@Blacksmoke16 Blacksmoke16 changed the title Enum argument resolver Enum QoL Features May 1, 2022
@Blacksmoke16 Blacksmoke16 marked this pull request as ready for review May 3, 2022 00:30
@Blacksmoke16 Blacksmoke16 merged commit 141416a into master May 3, 2022
@Blacksmoke16 Blacksmoke16 deleted the enum-value-resolver branch May 3, 2022 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant