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
  • !1555

go-server: Support additional properties as command line arguments

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/mapero/master into master 6 years ago
  • Overview 0
  • Commits 20
  • Pipelines 0
  • Changes 14

Created by: mapero

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 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

With this Pull Requests additional properties are supported as command line arguments:

  • packageVersion
  • sourceFolder
  • serverPort

Thanks.

@antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09)

Compare
  • master (base)

and
  • latest version
    c6bcf45c
    20 commits, 2 years ago

14 files
+ 299
- 94

    Preferences

    File browser
    Compare changes
docs/ge‎nerators‎
go-gin-s‎erver.md‎ +1 -0
go-ser‎ver.md‎ +3 -0
go‎.md‎ +1 -1
modules/openapi-g‎enerator/src/main‎
java/org/openapitoo‎ls/codegen/languages‎
AbstractGoC‎odegen.java‎ +2 -1
GoClientCo‎degen.java‎ +0 -2
GoServerCo‎degen.java‎ +51 -16
resources‎/go-server‎
Dockerfil‎e.mustache‎ +1 -1
main.m‎ustache‎ +2 -2
sam‎ples‎
client/pets‎tore/…/…/api‎
openap‎i.yaml‎ +99 -3
server/petstor‎e/go-api-server‎
a‎pi‎
openap‎i.yaml‎ +94 -65
g‎o‎
model_inlin‎e_object.go‎ +19 -0
model_inline‎_object_1.go‎ +23 -0
Docke‎rfile‎ +1 -1
mai‎n.go‎ +2 -2
docs/generators/go-gin-server.md
+ 1
- 0
  • View file @ c6bcf45c

  • Edit in single-file editor

  • Open in Web IDE


@@ -8,4 +8,5 @@ sidebar_label: go-gin-server
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|packageName|Go package name (convention: lowercase).| |openapi|
|packageVersion|Go package version.| |1.0.0|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
docs/generators/go-server.md
+ 3
- 0
  • View file @ c6bcf45c

  • Edit in single-file editor

  • Open in Web IDE


@@ -8,4 +8,7 @@ sidebar_label: go-server
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|packageName|Go package name (convention: lowercase).| |openapi|
|packageVersion|Go package version.| |1.0.0|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|sourceFolder|source folder for generated code| |go|
|serverPort|The network port the generated server binds to| |8080|
docs/generators/go.md
+ 1
- 1
  • View file @ c6bcf45c

  • Edit in single-file editor

  • Open in Web IDE


@@ -8,8 +8,8 @@ sidebar_label: go
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|packageName|Go package name (convention: lowercase).| |openapi|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|packageVersion|Go package version.| |1.0.0|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
+ 2
- 1
  • View file @ c6bcf45c

  • Edit in single-file editor

  • Open in Web IDE


@@ -112,7 +112,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
cliOptions.clear();
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Go package name (convention: lowercase).")
.defaultValue("openapi"));
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Go package version.")
.defaultValue("1.0.0"));
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC)
.defaultValue(Boolean.TRUE.toString()));
}
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
+ 0
- 2
  • View file @ c6bcf45c

  • Edit in single-file editor

  • Open in Web IDE


@@ -51,8 +51,6 @@ public class GoClientCodegen extends AbstractGoCodegen {
// default HIDE_GENERATION_TIMESTAMP to true
hideGenerationTimestamp = Boolean.TRUE;
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Go package version.")
.defaultValue("1.0.0"));
cliOptions.add(CliOption.newBoolean(WITH_GO_CODEGEN_COMMENT, "whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs"));
cliOptions.add(CliOption.newBoolean(WITH_XML, "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)"));
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
enhancement
1
enhancement
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference: CellularPrivacy/Android-IMSI-Catcher-Detector!5
Source branch: github/fork/mapero/master

Menu

Explore Projects Groups Snippets