Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#3479 from justinsb/tolerate_de…
Browse files Browse the repository at this point in the history
…precated_fields_in_swagger

mockgcp: tolerate deprecated field in swagger
  • Loading branch information
google-oss-prow[bot] authored Jan 20, 2025
2 parents 8a1aba1 + 2717010 commit 45f1867
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mockgcp/tools/gapic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func run(ctx context.Context) error {
decoder := json.NewDecoder(bytes.NewReader(b))
decoder.DisallowUnknownFields()
if err := decoder.Decode(doc); err != nil {
return fmt.Errorf("parsing json %q: %w", p, err)
return fmt.Errorf("parsing json %q (with DisallowUnknownFields): %w", p, err)
}

c := protogen.NewOpenAPIConverter(protoPackage, doc)
Expand Down
1 change: 1 addition & 0 deletions mockgcp/tools/gapic/pkg/openapi/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ type Resource struct {

// Method is a REST endpoint; a specific method against a resource.
type Method struct {
Deprecated bool `json:"deprecated"`
Description string `json:"description"`
FlatPath string `json:"flatPath"`

Expand Down

0 comments on commit 45f1867

Please sign in to comment.