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

Referenced TypeAliases #485

Closed
wants to merge 5 commits into from
Closed

Referenced TypeAliases #485

wants to merge 5 commits into from

Conversation

WoH
Copy link
Collaborator

@WoH WoH commented Sep 25, 2019

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Closing issues

Closes #204

If this is a new feature submission:

  • Has the issue had a maintainer respond to the issue and clarify that the feature is something that aligns with the goals and philosophy of the project?

Potential Problems With The Approach

Test plan

Generated validation models look good to me, I added some props to the validation model to indicate what we can do now.

Ideal test plan would be:

  • alias a string with validation
  • alias a number with validation
  • maybe alias a date with validation
  • maybe alias union/intersection
  • alias a union of a model and an alias with validation on the alias
  • alias nestedObjectLiteral with validation on a property within the nOL
  • generic type alias

For each of these:

  • Definition: Description
  • Definition: Example
  • Definition: type is $ref
  • Definition: Model is fine
  • Validation: Validates
  • Validates: invalidates

This is why this will probably take me a long time and I'd be super grateful if someone could contribute parts of that.

Opened a second pull request based on #475 .
To view only this PR without dependencies, use GitHub's filter commits feature. (Similar to this, but filter commits (left) instead of files (middle)).

Todo:

@WoH WoH changed the title References Type Aliases Referenced TypeAliases Sep 25, 2019
@WoH
Copy link
Collaborator Author

WoH commented Sep 28, 2019

Generated validation models look good to me, I added some props to the validation model to indicate what we can do now.

Ideal test plan would be:

  • alias a string with validation
  • alias a number with validation
  • maybe alias a date with validation
  • maybe alias union/intersection
  • alias a union of a model and an alias with validation on the alias
  • alias nestedObjectLiteral with validation on a property within the nOL.
  • generic type alias

For each of these:

  • Definition: Description
  • Definition: Example
  • Definition: type is $ref
  • Definition: Model is fine
  • Validation: Validates
  • Validates: invalidates

This is why this will probably take me a long time and I'd be super grateful if someone could contribute parts of that.

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.

TS type aliases are not supported
1 participant