-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update openapi-server codegen to re-create manual changes (#822)
The code in the repo has deviated from what openapi-generator-cli produces. This overrides the templates so that the generated code is equivalent. Signed-off-by: Paul Boyd <[email protected]>
- Loading branch information
Showing
19 changed files
with
650 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7.0.1 | ||
7.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{{>partial_header}} | ||
package {{packageName}} | ||
|
||
import ( | ||
"context" | ||
"net/http"{{#apiInfo}}{{#apis}}{{#imports}} | ||
"{{import}}"{{/imports}}{{/apis}}{{/apiInfo}} | ||
|
||
model "github.com/kubeflow/model-registry/pkg/openapi" | ||
) | ||
|
||
|
||
{{#apiInfo}}{{#apis}} | ||
// {{classname}}Router defines the required methods for binding the api requests to a responses for the {{classname}} | ||
// The {{classname}}Router implementation should parse necessary information from the http request, | ||
// pass the data to a {{classname}}Servicer to perform the required actions, then write the service results to the http response. | ||
type {{classname}}Router interface { {{#operations}}{{#operation}} | ||
{{#isDeprecated}} | ||
// Deprecated | ||
{{/isDeprecated}} | ||
{{operationId}}(http.ResponseWriter, *http.Request){{/operation}}{{/operations}} | ||
}{{/apis}}{{/apiInfo}}{{#apiInfo}}{{#apis}} | ||
|
||
|
||
// {{classname}}Servicer defines the api actions for the {{classname}} service | ||
// This interface intended to stay up to date with the openapi yaml used to generate it, | ||
// while the service implementation can be ignored with the .openapi-generator-ignore file | ||
// and updated with the logic required for the API. | ||
type {{classname}}Servicer interface { {{#operations}}{{#operation}} | ||
{{#isDeprecated}} | ||
// Deprecated | ||
{{/isDeprecated}} | ||
{{operationId}}(context.Context{{#allParams}}, {{^isPrimitiveType}}model.{{/isPrimitiveType}}{{dataType}}{{/allParams}}) (ImplResponse, error){{/operation}}{{/operations}} | ||
}{{/apis}}{{/apiInfo}} |
Oops, something went wrong.