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

⚡ Upgrade type checking #26

Closed
Tracked by #24
pawelWritesCode opened this issue Jun 2, 2022 · 0 comments · Fixed by #30
Closed
Tracked by #24

⚡ Upgrade type checking #26

pawelWritesCode opened this issue Jun 2, 2022 · 0 comments · Fixed by #30
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@pawelWritesCode
Copy link
Owner

pawelWritesCode commented Jun 2, 2022

Following methods:

AssertNodeIsType
AssertNodeIsNotType
AssertNodeIsTypeAndValue

accepts "nil", "string", "int", "float", "bool", "map", "slice" as type argument.

Methods should be able to detect data types related with JSON / YAML.

So, methods should now accept also following types:

JSON: null, array, object, number, boolean
YAML: scalar, list, dictionary

Currently accepted types should remain available for any data format.

Internal methods implementation should change. Required changes are:

Add new services container to APIContext: TypeMappers
TypeMappers container should contain fields: JSON, YAML, Go which holds services for corresponding formats.

Add new subpackage: types with Mapper interface definition and implementation for JSON, YAML and Go-like formats.

@pawelWritesCode pawelWritesCode added this to the v16 milestone Jun 2, 2022
@pawelWritesCode pawelWritesCode added the enhancement New feature or request label Jun 2, 2022
@pawelWritesCode pawelWritesCode self-assigned this Jun 2, 2022
@pawelWritesCode pawelWritesCode linked a pull request Jun 10, 2022 that will close this issue
@pawelWritesCode pawelWritesCode changed the title Upgrade type checking ⚡ Upgrade type checking Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant