-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[php-slim4] Move Data Mocker to external repo #5930
Merged
wing328
merged 8 commits into
OpenAPITools:master
from
ybelenko:exclude-openapi-data-mocker
Jun 21, 2020
Merged
[php-slim4] Move Data Mocker to external repo #5930
wing328
merged 8 commits into
OpenAPITools:master
from
ybelenko:exclude-openapi-data-mocker
Jun 21, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ybelenko
force-pushed
the
exclude-openapi-data-mocker
branch
2 times, most recently
from
June 9, 2020 10:48
6e4e61a
to
7c3e9b5
Compare
ybelenko
changed the title
[Slim4] Move Data Mocker to external repo
[php-slim4] Move Data Mocker to external repo
Jun 12, 2020
ybelenko
force-pushed
the
exclude-openapi-data-mocker
branch
from
June 14, 2020 17:39
7c3e9b5
to
0ca1a8b
Compare
Test results:$ composer test
> phpunit
PHPUnit 8.5.5 by Sebastian Bergmann and contributors.
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.II.II.IIIIIIIIIIII.II.I 63 / 294 ( 21%)
I.II.II.III.IIII.II.II.IIII.II.IIIII.IIIIIII.II.IIII.III.II.II. 126 / 294 ( 42%)
II.IIII.III.I.IIIIII.III.II.IIIIIIIIIIIIIII.III.IIIII.IIII.III. 189 / 294 ( 64%)
II.II.IIIII.II.IIIIIII.IIII.I.IIIIIII.III.II.III.IIIIII.IIIIIII 252 / 294 ( 85%)
.IIIIIIIII.IIIIIIIIIIIIIIIIIIIIIIIIIIIIII. 294 / 294 (100%)
Time: 1.11 seconds, Memory: 16.00 MB
OK, but incomplete, skipped, or risky tests!
Tests: 294, Assertions: 144, Incomplete: 246. with PHPUnit 9 $ composer test
> phpunit
PHPUnit 9.2.3 by Sebastian Bergmann and contributors.
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.II.II.IIIIIIIIIIII.II.I 63 / 294 ( 21%)
I.II.II.III.IIII.II.II.IIII.II.IIIII.IIIIIII.II.IIII.III.II.II. 126 / 294 ( 42%)
II.IIII.III.I.IIIIII.III.II.IIIIIIIIIIIIIII.III.IIIII.IIII.III. 189 / 294 ( 64%)
II.II.IIIII.II.IIIIIII.IIII.I.IIIIIII.III.II.III.IIIIII.IIIIIII 252 / 294 ( 85%)
.IIIIIIIII.IIIIIIIIIIIIIIIIIIIIIIIIIIIIII. 294 / 294 (100%)
Time: 00:00.988, Memory: 16.00 MB
OK, but incomplete, skipped, or risky tests!
Tests: 294, Assertions: 144, Incomplete: 246. |
ybelenko
force-pushed
the
exclude-openapi-data-mocker
branch
from
June 15, 2020 16:56
f23f67b
to
c6d3ac6
Compare
ybelenko
force-pushed
the
exclude-openapi-data-mocker
branch
from
June 19, 2020 08:20
c6d3ac6
to
87c531c
Compare
Beside setters and getters this class implements three methods required for mocking: getOpenApiSchema, createFromData and jsonSerialize. BaseModel keeps all data values in $dataContainer like PHP client does. I don't see other way to support scalar models(enum for instance). That's why I've removed class variables generation.
This constant will be required for data deserialization when handling refs.
ybelenko
force-pushed
the
exclude-openapi-data-mocker
branch
from
June 20, 2020 14:46
87c531c
to
41ea439
Compare
Looks good to me. For the CI failure, I'll try to fix it after merging this PR |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think current Mocker deserves it's own repo(even repos). All created packages under MIT license. I added them to Packagist first, but deleted few days after. They not tested enough and not sure that I'm 100% satisfied with created interfaces. While library isn't public(removed from Packagist) it still can be installed via direct Github link like it done in this PR.
I'm open to discussion, especially I wait any thoughts about new interfaces whether they can be helpful as a standalone library.
This PR is 99% ready, the only future change is repo links in
composer.json
. I'll update them after Packagist publication.Links to created packages
cc @jebentier, @dkarlovi, @mandrean, @jfastnacht, @ackintosh, @renepardon and special biggest invitation to @jimschubert. I know that you don't like PHP, but if you can give any feedback about new interfaces I appreciate it very much.
PR checklist
./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc).master
,4.3.x
,5.0.x
. Default:master
.