-
Notifications
You must be signed in to change notification settings - Fork 6k
Typescript angular2 typings #4795
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 angular2 typings #4795
Conversation
This update allows the root Dockerfile to be used as a development container and updates run-in-docker.sh to use the same entrypoint script while maintaining backward compatibility for anyone who has scripted mappings to /gen and /root/.m2/repository.
…codegen into jimschubert-dockerfiles
Signed-off-by: weiyang <weiyang.ones@gmail.com>
When a string enumeration has the empty string as one of its available values, the generated code for many languages is invalid because the empty string can not be used as an identifier. As with numbers and symbols, provide a mapping to an English name which can be used as a replacement. In this case, "empty" for the empty string/empty value. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
…required switch, in place of only show the field type by default (#4489)
* Fix Gson parsing of Joda DateTime without millis The DateTimeFormatter returned by ISODateTimeFormat.dateTime() only parses dates with millisecond values, and throws IllegalArgumentException when milliseconds are not present. The date-time construct from RFC 3339 Section 5.6 referenced by the Swagger/OpenAPI spec allows fractional second values to be omitted. This results in valid date-time values being rejected by the generated code. This commit fixes the problem by using .dateOptionalTimeParser() for parsing, which correctly handles date-time values without fractional seconds. A previous version of this commit used .dateTimeParser(), which accepted a time without a date and was considered too liberal. Note that .dateTime() must still be used for printing, which is not supported by .dateTimeParser(). Signed-off-by: Kevin Locke <kevin@kevinlocke.name> * Fix akka-scala date-time parser with Joda As in the previous commit, which fixed Java generators, ISOISODateTimeFormat.dateOptionalTimeParser() should be used for date-time parsing and ISOISODateTimeFormat.dateTime() for printing. Apply the same change to akka-scala. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* [swift3] allow POST with both body and query parameters * Correctly support non-string and optional query parameters.
updated version
* Preliminary implementation for issue-4416 * Updated README.md with reserved-words-mappings parameter.
* Fixes for issue 4226. Detects and warns about more than one inline object; sets discriminator on CodegenModel; Adds templates to other Java languages Changes to be committed: modified: modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java modified: modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache new file: modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache new file: modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache new file: modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache * Add vendor extension for x-discriminator-value Changes to be committed: modified: modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache modified: modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache modified: modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache modified: modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache * Add "visible = true" to @JsonTypeInfo jackson annotations for Java languages Changes to be committed: modified: modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache modified: modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache modified: modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache modified: modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache
* add script to detect carriage return * add check for generator as well * add fail fast to travis config * remove tab * move scripts under bin/utils * remove carriage return * move scripts to bin/utils
[dockerfile] Replace 'maven:3.3-jdk-7' with 'maven:3-jdk-7-alpine'
…tor (#4740) * [Java-Feign] Fixed String comparison using equals instead of == operator * [Java-Feign] Updated ApiClient with ./bin/java-petstore-feign.sh
…egen into MatanRubin-uuid-type
* [Java-Feign] Fixed String comparison using equals instead of == operator * [Java-Feign] Updated ApiClient with ./bin/java-petstore-feign.sh * [Java-retrofit] Fix for #4750 String comparison with equals
This also removes the dependency to the typings project. Issue #4761
Since this might be a breaking change (depending on typescript 2), I filed the PR against 2.3.0, but I developed against master, resulting in a bunch of conflicting files. Hope you can help to merge? @wing328 ? |
@BastiOfBerlin I have made a PR that I expect will be merged soon either to this or to master. (#4766) In that it changes the abstract typescript to generate typings for all. I will be making another PR to update those to only use @types instead but this should be done at the Abstract scale not per client |
@kenisteward When do you expect this to work? Maybe it makes sense to work together? |
@BastiOfBerlin I think what I'll do is to cherry-pick 9444c49 |
@kenisteward are you ok if I just cherry-pick For #4766 (comment), if you've completed the test and it's ready for merge, let me know. |
@kenisteward thanks for reviewing. I'll do it tomorrow with a new PR |
Closed via #5966 |
This also removes the dependency to the typings project.
Issue #4761
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0
branch for breaking (non-backward compatible) changes.Description of the PR
This PR changes the way typescript's typings are resolved, from the old-way of utilizing the typings project to using @types/* npm packages, which is the default way for typescript2.
A big drawback of the typings project was that it could not be installed offline and relied on an own registry.
The README has also been updated to reflect the changes, outline the use of
@angular/cli
's environments and show how to usenpm link
.