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

Assert allOf produces intersections #19

Closed
AlexanderAllen opened this issue Apr 19, 2024 · 0 comments · Fixed by #38
Closed

Assert allOf produces intersections #19

AlexanderAllen opened this issue Apr 19, 2024 · 0 comments · Fixed by #38
Assignees
Labels
unit test Unit test needs to be created or updated
Milestone

Comments

@AlexanderAllen
Copy link
Owner

Currently Medianoche seems to indicate allOf keywords will be interpreted as intersections.

However, the initial test case done in #6 does not assert whether the resulting types represent a intersection.

The anyOf test case got it right when checking for the final representation, use as an example.

@AlexanderAllen AlexanderAllen added the unit test Unit test needs to be created or updated label Apr 19, 2024
@AlexanderAllen AlexanderAllen added this to the 1.0.0-alpha milestone Apr 19, 2024
@AlexanderAllen AlexanderAllen self-assigned this Apr 19, 2024
AlexanderAllen added a commit that referenced this issue Apr 28, 2024
* Keyword `not` completed in #5

* Capture additional todos and requirements in #20, #21.

* Captured comment in #21.

* Note todo for test case allOf, issue #19.

* Make TODOs for #15, #22, #23 in the code.

* Tag #15 re: anyOf.

* Issue #18: Initial boilerplate for file printer.

* Update PanDeAgua boilerplate.

* Promote all MediaNoche code except typematcher function.

* Set Setup as a shared fixture in SRC :/

Sadly, can't seem to be able to leave this fixture under tests.
PHPUnit does not see the namespaced class import, probably due to PHPUnit autoloading.

* OMG: Wrong namespace !

I have been using \Test instead of \Tests all this time?
composer.json autload is the source of thruth here.

* Move all schemas from fixture to schema dir.

* Demote Setup from src to tests where it belongs.

* Make test namespace singular in composer autoload.

* Make test directory consistent with namespace.

* Git ignore only current schema path, but not sub paths.

* Changed tests directory to singular test.

* Update test path for PHPStan.

* Initial print file implementation.

* Disable namespace resolution and specify output directory.

* Promote file printer to class.

* Initial pan de agua comments.

* Assert output file contains source class.

* Swap out default printer for PSR printer.

* Let the user decide both on nullable and readonly attributes.

* Only set default value if present in source schema.

* Address illegal characters for PHP symbols.

* Cleanup some namespaces.

* Update test paths on media noche.

* Change test target to public file.

* Update test path on Github Actions.

* Create tmp output dir on github pipeline.

* Create tmp output dir on github pipeline.
AlexanderAllen added a commit that referenced this issue May 1, 2024
@AlexanderAllen AlexanderAllen linked a pull request May 1, 2024 that will close this issue
AlexanderAllen added a commit that referenced this issue May 1, 2024
* Rename example to archive.

These examples are no longer relevant as unit test, but as archived code.

* Move focaccia and pan sobao to archive.

* Test boilerplate for issue #19

* Assert member property if of type intersection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit test Unit test needs to be created or updated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant