Skip to content

Enum QoL Features#173

Merged
Blacksmoke16 merged 13 commits intomasterfrom
enum-value-resolver
May 3, 2022
Merged

Enum QoL Features#173
Blacksmoke16 merged 13 commits intomasterfrom
enum-value-resolver

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