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
  • !5380
An error occurred while fetching the assigned milestone of the selected merge_request.

[go][java] Document new parameterized server support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jim Schubert requested to merge java-server-variable-support-meta into master 5 years ago
  • Overview 0
  • Commits 5
  • Pipelines 0
  • Changes 6

Support for parameterized server was added to java in #4998 and go in #4635. This flags the metadata as supported so it will display on our generator docs pages.

See also #590

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

FYI:

Java Technical Committee @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @bkabrda (2020/01)

Go Technical Committee @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09) @bkabrda (2019/07)

Compare
  • master (base)

and
  • latest version
    a6f98bca
    5 commits, 2 years ago

6 files
+ 14
- 3

    Preferences

    File browser
    Compare changes
docs/ge‎nerators‎
go-experi‎mental.md‎ +1 -1
go‎.md‎ +1 -1
jav‎a.md‎ +1 -1
modules/openap‎i-generator/src‎
main/java/org/…/‎codegen/languages‎
GoClientCo‎degen.java‎ +3 -0
JavaClientC‎odegen.java‎ +4 -0
test/java/org/opena‎pitools/codegen/java‎
JavaClientCod‎egenTest.java‎ +4 -0
docs/generators/go-experimental.md
+ 1
- 1
  • View file @ a6f98bca

  • Edit in single-file editor

  • Open in Web IDE


@@ -162,7 +162,7 @@ sidebar_label: go-experimental
|Examples|✓|OAS2,OAS3
|XMLStructureDefinitions|✗|OAS2,OAS3
|MultiServer|✗|OAS3
|ParameterizedServer|✗|OAS3
|ParameterizedServer|✓|OAS3
|ParameterStyling|✗|OAS3
|Callbacks|✗|OAS3
|LinkObjects|✗|OAS3
docs/generators/go.md
+ 1
- 1
  • View file @ a6f98bca

  • Edit in single-file editor

  • Open in Web IDE


@@ -162,7 +162,7 @@ sidebar_label: go
|Examples|✓|OAS2,OAS3
|XMLStructureDefinitions|✗|OAS2,OAS3
|MultiServer|✗|OAS3
|ParameterizedServer|✗|OAS3
|ParameterizedServer|✓|OAS3
|ParameterStyling|✗|OAS3
|Callbacks|✗|OAS3
|LinkObjects|✗|OAS3
docs/generators/java.md
+ 1
- 1
  • View file @ a6f98bca

  • Edit in single-file editor

  • Open in Web IDE


@@ -241,7 +241,7 @@ sidebar_label: java
|Examples|✓|OAS2,OAS3
|XMLStructureDefinitions|✗|OAS2,OAS3
|MultiServer|✗|OAS3
|ParameterizedServer|✗|OAS3
|ParameterizedServer|✓|OAS3
|ParameterStyling|✗|OAS3
|Callbacks|✗|OAS3
|LinkObjects|✗|OAS3
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
+ 3
- 0
  • View file @ a6f98bca

  • Edit in single-file editor

  • Open in Web IDE


@@ -52,6 +52,9 @@ public class GoClientCodegen extends AbstractGoCodegen {
SecurityFeature.ApiKey,
SecurityFeature.OAuth2_Implicit
))
.includeGlobalFeatures(
GlobalFeature.ParameterizedServer
)
.excludeGlobalFeatures(
GlobalFeature.XMLStructureDefinitions,
GlobalFeature.Callbacks,
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
+ 4
- 0
  • View file @ a6f98bca

  • Edit in single-file editor

  • Open in Web IDE


@@ -26,6 +26,7 @@ import org.openapitools.codegen.languages.features.BeanValidationFeatures;
import org.openapitools.codegen.languages.features.GzipFeatures;
import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures;
import org.openapitools.codegen.meta.features.DocumentationFeature;
import org.openapitools.codegen.meta.features.GlobalFeature;
import org.openapitools.codegen.templating.mustache.CaseFormatLambda;
import org.openapitools.codegen.utils.ProcessUtils;
import org.slf4j.Logger;
@@ -106,8 +107,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
public JavaClientCodegen() {
super();
// TODO: Move GlobalFeature.ParameterizedServer to library: jersey after moving featureSet to generatorMetadata
featureSet = getFeatureSet().modify()
.includeDocumentationFeatures(DocumentationFeature.Readme)
.includeGlobalFeatures(GlobalFeature.ParameterizedServer)
.build();
outputFolder = "generated-code" + File.separator + "java";
@@ -290,6 +293,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportingFiles.add(new SupportingFile("ApiClient.mustache", invokerFolder, "ApiClient.java"));
supportingFiles.add(new SupportingFile("ServerConfiguration.mustache", invokerFolder, "ServerConfiguration.java"));
supportingFiles.add(new SupportingFile("ServerVariable.mustache", invokerFolder, "ServerVariable.java"));
if (!(RESTTEMPLATE.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) {
supportingFiles.add(new SupportingFile("StringUtil.mustache", invokerFolder, "StringUtil.java"));
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
2
2 participants
Administrator
Tomasz Prus
Reference:
Source branch: java-server-variable-support-meta

Menu

Explore Projects Groups Snippets