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

Add Nim client code generator #3879

Merged
merged 49 commits into from
Sep 13, 2019
Merged

Conversation

hokamoto
Copy link
Contributor

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

I add the client code generator for Nim Programming Language.

hokamoto and others added 30 commits September 2, 2019 08:26
* [Dart] Fix README template and update testing doco

- deleted redundant shell script
- fixed and updated README template
- updated test package and moved to a dev_dependency
- removed old unused dev_dependency packages
- updated testing documentation in petstore sample

* Remove references to dart-flutter-petstore.sh

* Fix typos

* Fix typo
* add gitHost param to GeneratorSettings and related

* parameterize gitHost in READMEs

* parameterize gitHost in go.mod

* parameterize gitHost in git_push

* update petstore samples

* run ./bin/utils/export_docs_generators.sh

* run meta-codehen.sh

* Revert "run meta-codehen.sh"

This reverts commit d6d579f.

* Revert "run ./bin/utils/export_docs_generators.sh"

This reverts commit 1b81538.

* Revert "update petstore samples"

This reverts commit f513add.

* run ensure-up-to-date
* better varible naming

* better comments

* better code format for go experimental client

* better comment, update samples
* add grpc protobuf generator

* update doc

* add new doc

* add windows batch, comment out root proto
* issue OpenAPITools#2845: enable 'supportsMultipleInheritance' on typescript angular client codegen

- note I reran ./bin/openapi3/typescript-angular-petstore-all.sh and no changes occurred.
  this suggests to me that the petstore.yaml sample should be improved to make use of the
  anyOf / allOf / oneOf keywords, in order to better show the effects of changes on generated code.

* issue OpenAPITools#2845: run ./bin/openapi3/typescript-angular-petstore-all.sh

* run `mvn clean package && ./bin/typescript-angular-petstore-all.sh`

* revert extranous files
… hash calculation) (OpenAPITools#3826)

* This patch fixes the bug that we cannot access to remote files when checking file updates.
Following up OpenAPITools#3440, supporting auth.

* 1792 fix remote spec handling and hash calculation (OpenAPITools#3440)

(cherry picked from commit 2a2eefe)

* fix detecting remote file / local file logic while finding the hash file, taking care of IllegalArgumentException for local files.

* add testcase
…3846)

* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam}

* fix to bug OpenAPITools#3157

* update samples
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 the PR
Please also update the README.md to add the Nim language.
If you want, you could add yourself to the technical committee https://github.com/OpenAPITools/openapi-generator/blob/master/README.md#62---openapi-generator-technical-committee

@hokamoto
Copy link
Contributor Author

Hi @macjohnny,
Tests by Travis CI failed due to a strange error. Could you advise me on how to solve it?

@macjohnny
Copy link
Member

@hokamoto I think the error is unrelated, I restarted the build, let's see

@macjohnny
Copy link
Member

the CI passes.
@wing328 can we merge this, as it is a new generator, or does anyone else have to review it?

@@ -0,0 +1,309 @@
package org.openapitools.codegen.languages;
Copy link
Member

Choose a reason for hiding this comment

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

I'll add the copyright header in another PR.

}

public String getHelp() {
return "Generates a nim client.";
Copy link
Member

Choose a reason for hiding this comment

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

I'll add the word "beta" as follows:

Generates a nim client (beta).

return name;
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

We're using 4 space indention so I'll reformat the code in a separate PR.

@wing328
Copy link
Member

wing328 commented Sep 13, 2019

@wing328 can we merge this, as it is a new generator, or does anyone else have to review it?

I left a couple of comments. Will work on those in a separate PR.

Let's launch this and see if nim developers have feedback on this new generator.

@wing328 wing328 merged commit f15f814 into OpenAPITools:master Sep 13, 2019
@hokamoto hokamoto deleted the nim-client branch September 13, 2019 08:46
@wing328
Copy link
Member

wing328 commented Sep 13, 2019

@hokamoto thanks for the new generator. may I know if you've a Twitter account?

We'll tag you in the tweet to promote the new generator.

@hokamoto
Copy link
Contributor Author

@wing328 Hi, my Twitter account is @tox2ro (https://twitter.com/tox2ro)

jimschubert added a commit that referenced this pull request Sep 13, 2019
* master: (22 commits)
  various minor improvements to nim generator (#3883)
  Add Nim client code generator (#3879)
  updated google-api-client version from 1.23.0 to 1.30.2.  Bugfix #3625 (#3882)
  typescript-fetch: fix missing comma in multiple imports (#3881)
  [scala][client] add Scala code generation test (#3859)
  typescript-node: Use HttpError class when rejecting promises (#3876)
  update stable release
  update doc, samples (#3875)
  BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3860)
  fix version in readme
  Prepare v4.1.2 release (#3873)
  Rename gRPC generator to "protobuf-schema" (#3864)
  typescript-axios: Fix baseoptions (#3866)
  Fix/r/serialization fix and minor 3xx resp fix (#3817)
  [typescript-angular] allow empty string basePath (#3489)
  typescript-inversify: improve check for required parameters, support multiple media types (#3849)
  [C++][Pistache] Add missing setter for arrays (#3837)
  Adds Http Info To Dart Api (#3851)
  [Java][okhttp-gson] fix failure to deserialize floats (#3846)
  maven-plugin-plugin 3.6.0 (#3854)
  ...
@wing328
Copy link
Member

wing328 commented Sep 13, 2019

Thanks. Here is the Tweet:

https://twitter.com/oas_generator/status/1172492657999794176

@wing328
Copy link
Member

wing328 commented Oct 4, 2019

@hokamoto thanks for the PR, which has been included in the v4.1.3 release: https://twitter.com/oas_generator/status/1180123829626003456

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.