[go] More idiomatic godoc comments (#10044)

* [go] More idiomatic godoc comments

* [go] Mark deprecated fields and functions

* [go] Minor mustache readability/consistency fixes

* [go] Mark deprecated operation parameters

* [go] Deprecate a petstore component property for testing

* [go] Apply deprecated godoc in Go servers also
This commit is contained in:
Nathan Baulch
2021-08-03 19:11:16 +10:00
committed by GitHub
parent 4210b41f84
commit c1c5775271
178 changed files with 2344 additions and 2169 deletions

View File

@@ -24,6 +24,7 @@ type PetApiRouter interface {
AddPet(http.ResponseWriter, *http.Request)
DeletePet(http.ResponseWriter, *http.Request)
FindPetsByStatus(http.ResponseWriter, *http.Request)
// Deprecated
FindPetsByTags(http.ResponseWriter, *http.Request)
GetPetById(http.ResponseWriter, *http.Request)
UpdatePet(http.ResponseWriter, *http.Request)
@@ -62,6 +63,7 @@ type PetApiServicer interface {
AddPet(context.Context, Pet) (ImplResponse, error)
DeletePet(context.Context, int64, string) (ImplResponse, error)
FindPetsByStatus(context.Context, []string) (ImplResponse, error)
// Deprecated
FindPetsByTags(context.Context, []string) (ImplResponse, error)
GetPetById(context.Context, int64) (ImplResponse, error)
UpdatePet(context.Context, Pet) (ImplResponse, error)

View File

@@ -156,6 +156,7 @@ func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Reque
}
// FindPetsByTags - Finds Pets by tags
// Deprecated
func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query()
tags := strings.Split(query.Get("tags"), ",")

View File

@@ -67,6 +67,7 @@ func (s *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
}
// FindPetsByTags - Finds Pets by tags
// Deprecated
func (s *PetApiService) FindPetsByTags(ctx context.Context, tags []string) (ImplResponse, error) {
// TODO - update FindPetsByTags with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -23,5 +23,6 @@ type Pet struct {
Tags []Tag `json:"tags,omitempty"`
// pet status in the store
// Deprecated
Status string `json:"status,omitempty"`
}