Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !1730

[Typescript-Angular] add nullable support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/smasala/typescript-nullable into master 6 years ago
  • Overview 0
  • Commits 6
  • Pipelines 0
  • Changes 2

Created by: smasala

PR checklist

  • Read the contribution guidelines.
  • x] 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 and ./bin/security/{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\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.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

Support v3 spec config nullable so that --strictNullChecks can be used with Typescript

@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @wing328

Compare
  • master (base)

and
  • latest version
    2f549a71
    6 commits, 2 years ago

2 files
+ 2
- 2

    Preferences

    File browser
    Compare changes
modules/…/…/…/…/t‎ypescript-angular‎
modelGener‎ic.mustache‎ +1 -1
modelTaggedU‎nion.mustache‎ +1 -1
modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache
+ 1
- 1
  • View file @ 2f549a71

  • Edit in single-file editor

  • Open in Web IDE


@@ -5,6 +5,6 @@ export interface {{classname}}{{#allParents}}{{#-first}} extends {{/-first}}{{{.
* {{{description}}}
*/
{{/description}}
{{#isReadOnly}}readonly {{/isReadOnly}}{{{name}}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}};
{{#isReadOnly}}readonly {{/isReadOnly}}{{{name}}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}};
{{/vars}}
}{{>modelGenericEnums}}
modules/openapi-generator/src/main/resources/typescript-angular/modelTaggedUnion.mustache
+ 1
- 1
  • View file @ 2f549a71

  • Edit in single-file editor

  • Open in Web IDE


@@ -10,7 +10,7 @@ export interface {{classname}} { {{>modelGenericAdditionalProperties}}
* {{{description}}}
*/
{{/description}}
{{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{discriminatorValue}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}};
{{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{discriminatorValue}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}};
{{/allVars}}
}
{{>modelGenericEnums}}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
3
Client: TypeScript Enhancement: Feature Feature: OAS 3.0 spec support
3
Client: TypeScript Enhancement: Feature Feature: OAS 3.0 spec support
    Assign labels
  • Manage project labels

Milestone
4.0.0
4.0.0 (expired)
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
2
2 participants
Administrator
William Cheng
Reference: OpenAPITools/openapi-generator!1730
Source branch: github/fork/smasala/typescript-nullable

Menu

Explore Projects Groups Snippets