You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/generators/go-experimental.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ sidebar_label: go-experimental
7
7
| ------ | ----------- | ------ | ------- |
8
8
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
9
9
|enumClassPrefix|Prefix enum with class name||false|
10
+
|generateInterfaces|Generate interfaces for api classes||false|
10
11
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.||true|
11
12
|isGoSubmodule|whether the generated Go module is a submodule||false|
12
13
|packageName|Go package name (convention: lowercase).||openapi|
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/main/resources/go-experimental/api.mustache
+56-28Lines changed: 56 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -15,49 +15,77 @@ import (
15
15
var (
16
16
_ _context.Context
17
17
)
18
+
{{#generateInterfaces}}
19
+
20
+
type {{classname}} interface {
21
+
{{#operation}}
22
+
23
+
/*
24
+
* {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
25
+
{{#notes}}
26
+
* {{{unescapedNotes}}}
27
+
{{/notes}}
28
+
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
{{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
68
+
* {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
39
69
{{#notes}}
40
-
{{{unescapedNotes}}}
70
+
* {{{unescapedNotes}}}
41
71
{{/notes}}
42
72
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
0 commit comments