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

[Typescript] update addImport method (fix oneOf) #11689

Merged
merged 9 commits into from
May 30, 2022
Merged

[Typescript] update addImport method (fix oneOf) #11689

merged 9 commits into from
May 30, 2022

Conversation

ksvirkou-hubspot
Copy link
Contributor

@ksvirkou-hubspot ksvirkou-hubspot commented Feb 22, 2022

fixes #11679

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@ksvirkou-hubspot
Copy link
Contributor Author

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

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

thanks for your contribution!

if (type == null) {
return;
}

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

can you add tests that are directly related to your code change? i.e. tests that would fail without your change.

Copy link
Contributor Author

@ksvirkou-hubspot ksvirkou-hubspot Feb 23, 2022

Choose a reason for hiding this comment

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

Ok
I ll try to do something
but maybe it would be an example of this in the petstore and test there
I ll think over it

@akehir
Copy link
Contributor

akehir commented Feb 23, 2022

Would it make sense to have an example of this in the petstore yaml files? I've run in the bug myself, but it would be good to prevent regressions.

@macjohnny
Copy link
Member

FYI see also #11719

@ksvirkou-hubspot
Copy link
Contributor Author

ksvirkou-hubspot commented Apr 25, 2022

Hi @macjohnny
I ve just tryed to add sample in the petstore but I can't build anything in the pestore
I see many errors
for example
Снимок экрана 2022-04-25 в 18 04 43
The reason probably in this PR
code base was updated but sapmes don’t work
there are necessary update typescript version and fix some code
for example ?. was added in ts 3.7
but in package set "typescript": "^2.4.1"
that is why I can’t add tests
any ideas how to resolve it?

@macjohnny
Copy link
Member

@ksvirkou-hubspot we recently dropped support for typescript below 4, see #12123

@ksvirkou-hubspot
Copy link
Contributor Author

@macjohnny
This PR updated builds and mustaches but it didn't update tests
for example
"typescript": "^2.4.1"
https://github.com/OpenAPITools/openapi-generator/blob/master/samples/openapi3/client/petstore/typescript/tests/default/package.json

@macjohnny
Copy link
Member

I wonder whether they are executed on the CI at all.
Do you want to update the tests and check their execution?

@ksvirkou-hubspot ksvirkou-hubspot changed the title update addImport method (fix oneOf) [Typescript] update addImport method (fix oneOf) May 27, 2022
@ksvirkou-hubspot
Copy link
Contributor Author

I wonder whether they are executed on the CI at all. Do you want to update the tests and check their execution?

No I have no time sorry
And I don’t know how to add here test
I ve try to add sample but now code changed and this function isn't use
we can close this pr but if the code will changed again we will have a problem

@macjohnny macjohnny merged commit 129fd0a into OpenAPITools:master May 30, 2022
@ksvirkou-hubspot ksvirkou-hubspot deleted the bugFix/oneOf branch May 30, 2022 19:47
@wing328 wing328 added this to the 6.0.1 milestone Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG][Typescript] Invalid oneOf
4 participants