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

Tests for "fix(parameters): Support int numerals #38" #30

Closed

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Nov 10, 2023

Before After
Bildschirmfoto vom 2023-11-10 12-48-43 Bildschirmfoto vom 2023-11-10 12-48-09

@nickvergessen nickvergessen added the bug Something isn't working label Nov 10, 2023
@nickvergessen nickvergessen self-assigned this Nov 10, 2023
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be possible to merge this with the string enum handling to reduce duplicate code since they are both quite similar.

@nickvergessen
Copy link
Member Author

I don't have a usecase atm, but i wonder what happens if you mix int+string on one parameter, will try after lunch

@provokateurin
Copy link
Member

I think it should resort to using oneOf. Only string and int are enums that would make sense (boolean maybe too?)

@nickvergessen
Copy link
Member Author

* @param 0|1|'yes'|'no'|true

You mean?

@provokateurin
Copy link
Member

Yes, although now I'm not sure how it will handle it 😅

@nickvergessen
Copy link
Member Author

Let's move that to a follow up, as mixed types seem to not work at all:

* @param 0|1|'yes'|'no'|true $weird Weird list

Generates:

                    {
                        "name": "weird",
                        "in": "query",
                        "description": "Weird list",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },

@provokateurin
Copy link
Member

@nickvergessen can you set the target branch to the main branch and drop the scope commits so we can get this merged already?

@nickvergessen
Copy link
Member Author

Well doesn't work with the test files.

I can make a new PR against master with only the source code, but we should keep a second PR/branch/commit to merge the tests as soon as that is possible.

@provokateurin
Copy link
Member

Fine by me

@nickvergessen nickvergessen marked this pull request as draft December 6, 2023 14:18
@nickvergessen nickvergessen force-pushed the techdebt/20/openapi-scopes branch from 0358899 to 93a6490 Compare December 7, 2023 10:25
@nickvergessen nickvergessen changed the title fix(parameters): Support int numerals Tests for "fix(parameters): Support int numerals #38" Dec 7, 2023
@nickvergessen nickvergessen force-pushed the techdebt/20/openapi-scopes branch 3 times, most recently from ac83995 to 94962d4 Compare December 8, 2023 08:45
@nickvergessen nickvergessen changed the base branch from techdebt/20/openapi-scopes to feat/noid/testing December 21, 2023 10:26
@nickvergessen
Copy link
Member Author

Test added in #59

@provokateurin provokateurin deleted the bugfix/noid/support-int-enums branch January 17, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants