From fd98f7f29023aec0042d7d304524d4856c903ee6 Mon Sep 17 00:00:00 2001 From: Jatin Naik Date: Mon, 23 Sep 2024 17:26:06 +0100 Subject: [PATCH] feat: populate api owners in operation extensions --- go.mod | 1 + go.sum | 2 ++ internal/simplebuild/build.go | 17 +++++++++++++++++ resource.go | 16 +++++++++++++++- .../output/2021-06-01~experimental/spec.json | 3 +++ .../output/2021-06-01~experimental/spec.yaml | 2 ++ .../output/2021-06-04~experimental/spec.json | 6 ++++++ .../output/2021-06-04~experimental/spec.yaml | 4 ++++ .../output/2021-06-07~experimental/spec.json | 6 ++++++ .../output/2021-06-07~experimental/spec.yaml | 4 ++++ testdata/output/2021-06-13~beta/spec.json | 6 ++++++ testdata/output/2021-06-13~beta/spec.yaml | 4 ++++ .../output/2021-06-13~experimental/spec.json | 9 +++++++++ .../output/2021-06-13~experimental/spec.yaml | 6 ++++++ .../output/2021-08-20~experimental/spec.json | 12 ++++++++++++ .../output/2021-08-20~experimental/spec.yaml | 8 ++++++++ .../output/2023-06-01~experimental/spec.json | 15 +++++++++++++++ .../output/2023-06-01~experimental/spec.yaml | 10 ++++++++++ .../output/2023-06-02~experimental/spec.json | 15 +++++++++++++++ .../output/2023-06-02~experimental/spec.yaml | 10 ++++++++++ .../output/2023-06-03~experimental/spec.json | 12 ++++++++++++ .../output/2023-06-03~experimental/spec.yaml | 8 ++++++++ 22 files changed, 175 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2aa368ec..167dfcdf 100644 --- a/go.mod +++ b/go.mod @@ -95,6 +95,7 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.4 // indirect + github.com/hairyhenderson/go-codeowners v0.5.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/invopop/yaml v0.3.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect diff --git a/go.sum b/go.sum index 3c6a036a..7698e3f8 100644 --- a/go.sum +++ b/go.sum @@ -309,6 +309,8 @@ github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoF github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/hairyhenderson/go-codeowners v0.5.0 h1:dpQB+hVHiRc2VVvc2BHxkuM+tmu9Qej/as3apqUbsWc= +github.com/hairyhenderson/go-codeowners v0.5.0/go.mod h1:R3uW1OQXEj2Gu6/OvZ7bt6hr0qdkLvUWPiqNaWnexpo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= diff --git a/internal/simplebuild/build.go b/internal/simplebuild/build.go index 5d819e0d..195e3d0f 100644 --- a/internal/simplebuild/build.go +++ b/internal/simplebuild/build.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "net/http" + "os" "path/filepath" "slices" "sort" @@ -13,6 +14,7 @@ import ( "time" "github.com/getkin/kin-openapi/openapi3" + "github.com/hairyhenderson/go-codeowners" "github.com/tufin/oasdiff/checker" "github.com/tufin/oasdiff/diff" "github.com/tufin/oasdiff/load" @@ -84,6 +86,9 @@ func Build( return err } + if doc.Doc.Extensions == nil { + doc.Doc.Extensions = make(map[string]interface{}) + } doc.Doc.Extensions[vervet.ExtSnykApiVersion] = doc.VersionDate.Format(time.DateOnly) refResolver := NewRefResolver() @@ -205,6 +210,14 @@ func (ops Operations) VersionDates() []time.Time { func LoadPaths(ctx context.Context, api *config.API) (Operations, error) { operations := map[OpKey]VersionSet{} + cwd, err := os.Getwd() + if err != nil { + return nil, err + } + ownerFinder, err := codeowners.FromFile(cwd) + if err != nil { + return nil, err + } for _, resource := range api.Resources { paths, err := ResourceSpecFiles(resource) @@ -242,6 +255,10 @@ func LoadPaths(ctx context.Context, api *config.API) (Operations, error) { for _, pathName := range doc.T.Paths.InMatchingOrder() { pathDef := doc.T.Paths.Value(pathName) for opName, opDef := range pathDef.Operations() { + if opDef.Extensions == nil { + opDef.Extensions = make(map[string]interface{}) + } + opDef.Extensions[vervet.ExtSnykApiOwner] = ownerFinder.Owners(path) k := OpKey{ Path: pathName, Method: opName, diff --git a/resource.go b/resource.go index 82ee7e01..3a43527b 100644 --- a/resource.go +++ b/resource.go @@ -5,12 +5,14 @@ import ( "encoding/json" "errors" "fmt" + "os" "path/filepath" "strings" "time" "github.com/bmatcuk/doublestar/v4" "github.com/getkin/kin-openapi/openapi3" + "github.com/hairyhenderson/go-codeowners" "golang.org/x/exp/maps" ) @@ -33,6 +35,10 @@ const ( // overall version of the compiled spec at the document level. ExtSnykApiVersion = "x-snyk-api-version" + // ExtSnykApiOwner is used to annotate an operation in a compiled OpenAPI spec + // with the owners of the operation. This is useful to get to the owning github team. + ExtSnykApiOwner = "x-snyk-api-owners" + // ExtSnykApiReleases is used to annotate a path in a compiled OpenAPI spec // with all the release versions containing a change in the path info. This // is useful for navigating changes in a particular path across versions. @@ -208,7 +214,14 @@ func LoadResourceVersionsFileset(specYamls []string) (*ResourceVersions, error) path, operation string } opReleases := map[operationKey]VersionSlice{} - + cwd, err := os.Getwd() + if err != nil { + return nil, err + } + ownerFinder, err := codeowners.FromFile(cwd) + if err != nil { + return nil, err + } for i := range specYamls { specYamls[i], err = filepath.Abs(specYamls[i]) if err != nil { @@ -238,6 +251,7 @@ func LoadResourceVersionsFileset(specYamls []string) (*ResourceVersions, error) op.Extensions = make(map[string]any) } op.Extensions[ExtSnykApiVersion] = rc.Version.String() + op.Extensions[ExtSnykApiOwner] = ownerFinder.Owners(specYamls[i]) opKey := operationKey{path, opName} opReleases[opKey] = append(opReleases[opKey], rc.Version) } diff --git a/testdata/output/2021-06-01~experimental/spec.json b/testdata/output/2021-06-01~experimental/spec.json index fe4cc677..8b33c1f8 100644 --- a/testdata/output/2021-06-01~experimental/spec.json +++ b/testdata/output/2021-06-01~experimental/spec.json @@ -535,6 +535,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", diff --git a/testdata/output/2021-06-01~experimental/spec.yaml b/testdata/output/2021-06-01~experimental/spec.yaml index 7d841500..4463876a 100644 --- a/testdata/output/2021-06-01~experimental/spec.yaml +++ b/testdata/output/2021-06-01~experimental/spec.yaml @@ -381,6 +381,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental diff --git a/testdata/output/2021-06-04~experimental/spec.json b/testdata/output/2021-06-04~experimental/spec.json index 88f323ba..688f111e 100644 --- a/testdata/output/2021-06-04~experimental/spec.json +++ b/testdata/output/2021-06-04~experimental/spec.json @@ -629,6 +629,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", @@ -877,6 +880,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-04~experimental" ], diff --git a/testdata/output/2021-06-04~experimental/spec.yaml b/testdata/output/2021-06-04~experimental/spec.yaml index 8b6e4772..5bd88618 100644 --- a/testdata/output/2021-06-04~experimental/spec.yaml +++ b/testdata/output/2021-06-04~experimental/spec.yaml @@ -456,6 +456,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental @@ -615,6 +617,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-04~experimental x-snyk-api-version: 2021-06-04~experimental diff --git a/testdata/output/2021-06-07~experimental/spec.json b/testdata/output/2021-06-07~experimental/spec.json index 94ccb4c0..670447a9 100644 --- a/testdata/output/2021-06-07~experimental/spec.json +++ b/testdata/output/2021-06-07~experimental/spec.json @@ -629,6 +629,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", @@ -877,6 +880,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-04~experimental" ], diff --git a/testdata/output/2021-06-07~experimental/spec.yaml b/testdata/output/2021-06-07~experimental/spec.yaml index 2852a155..a1450728 100644 --- a/testdata/output/2021-06-07~experimental/spec.yaml +++ b/testdata/output/2021-06-07~experimental/spec.yaml @@ -456,6 +456,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental @@ -615,6 +617,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-04~experimental x-snyk-api-version: 2021-06-04~experimental diff --git a/testdata/output/2021-06-13~beta/spec.json b/testdata/output/2021-06-13~beta/spec.json index e7c433fa..bc3a8bde 100644 --- a/testdata/output/2021-06-13~beta/spec.json +++ b/testdata/output/2021-06-13~beta/spec.json @@ -565,6 +565,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-13~beta" ], @@ -645,6 +648,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", diff --git a/testdata/output/2021-06-13~beta/spec.yaml b/testdata/output/2021-06-13~beta/spec.yaml index 263592a0..a9e7a965 100644 --- a/testdata/output/2021-06-13~beta/spec.yaml +++ b/testdata/output/2021-06-13~beta/spec.yaml @@ -403,6 +403,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-13~beta x-snyk-api-version: 2021-06-13~beta @@ -454,6 +456,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental diff --git a/testdata/output/2021-06-13~experimental/spec.json b/testdata/output/2021-06-13~experimental/spec.json index 50029cb0..522944b1 100644 --- a/testdata/output/2021-06-13~experimental/spec.json +++ b/testdata/output/2021-06-13~experimental/spec.json @@ -659,6 +659,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-13~beta" ], @@ -739,6 +742,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", @@ -985,6 +991,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-04~experimental" ], diff --git a/testdata/output/2021-06-13~experimental/spec.yaml b/testdata/output/2021-06-13~experimental/spec.yaml index 83bd9741..f28b4fcd 100644 --- a/testdata/output/2021-06-13~experimental/spec.yaml +++ b/testdata/output/2021-06-13~experimental/spec.yaml @@ -478,6 +478,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-13~beta x-snyk-api-version: 2021-06-13~beta @@ -529,6 +531,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental @@ -686,6 +690,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-04~experimental x-snyk-api-version: 2021-06-04~experimental diff --git a/testdata/output/2021-08-20~experimental/spec.json b/testdata/output/2021-08-20~experimental/spec.json index d160d6fd..6e053344 100644 --- a/testdata/output/2021-08-20~experimental/spec.json +++ b/testdata/output/2021-08-20~experimental/spec.json @@ -659,6 +659,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-13~beta" ], @@ -739,6 +742,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", @@ -985,6 +991,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-04~experimental" ], @@ -1058,6 +1067,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-08-20~experimental", "2023-06-03~experimental" diff --git a/testdata/output/2021-08-20~experimental/spec.yaml b/testdata/output/2021-08-20~experimental/spec.yaml index 665b2472..ef97f378 100644 --- a/testdata/output/2021-08-20~experimental/spec.yaml +++ b/testdata/output/2021-08-20~experimental/spec.yaml @@ -478,6 +478,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-13~beta x-snyk-api-version: 2021-06-13~beta @@ -529,6 +531,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental @@ -642,6 +646,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-08-20~experimental - 2023-06-03~experimental @@ -736,6 +742,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-04~experimental x-snyk-api-version: 2021-06-04~experimental diff --git a/testdata/output/2023-06-01~experimental/spec.json b/testdata/output/2023-06-01~experimental/spec.json index 5e4b5adf..2d68c280 100644 --- a/testdata/output/2023-06-01~experimental/spec.json +++ b/testdata/output/2023-06-01~experimental/spec.json @@ -659,6 +659,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-13~beta" ], @@ -739,6 +742,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", @@ -985,6 +991,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-04~experimental" ], @@ -1058,6 +1067,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-08-20~experimental", "2023-06-03~experimental" @@ -1103,6 +1115,9 @@ "tags": [ "Users" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2023-06-01~experimental", "2023-06-02~experimental" diff --git a/testdata/output/2023-06-01~experimental/spec.yaml b/testdata/output/2023-06-01~experimental/spec.yaml index 9b6f0cb6..a5ee4475 100644 --- a/testdata/output/2023-06-01~experimental/spec.yaml +++ b/testdata/output/2023-06-01~experimental/spec.yaml @@ -478,6 +478,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-13~beta x-snyk-api-version: 2021-06-13~beta @@ -529,6 +531,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental @@ -642,6 +646,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-08-20~experimental - 2023-06-03~experimental @@ -736,6 +742,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-04~experimental x-snyk-api-version: 2021-06-04~experimental @@ -764,6 +772,8 @@ paths: $ref: '#/components/responses/500' tags: - Users + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2023-06-01~experimental - 2023-06-02~experimental diff --git a/testdata/output/2023-06-02~experimental/spec.json b/testdata/output/2023-06-02~experimental/spec.json index f1e26d9e..40daf7ea 100644 --- a/testdata/output/2023-06-02~experimental/spec.json +++ b/testdata/output/2023-06-02~experimental/spec.json @@ -659,6 +659,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-13~beta" ], @@ -739,6 +742,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", @@ -985,6 +991,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-04~experimental" ], @@ -1058,6 +1067,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-08-20~experimental", "2023-06-03~experimental" @@ -1104,6 +1116,9 @@ "Users" ], "x-snyk-api-lifecycle": "sunset", + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2023-06-01~experimental", "2023-06-02~experimental" diff --git a/testdata/output/2023-06-02~experimental/spec.yaml b/testdata/output/2023-06-02~experimental/spec.yaml index 06f6d144..c19edaad 100644 --- a/testdata/output/2023-06-02~experimental/spec.yaml +++ b/testdata/output/2023-06-02~experimental/spec.yaml @@ -478,6 +478,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-13~beta x-snyk-api-version: 2021-06-13~beta @@ -529,6 +531,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental @@ -642,6 +646,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-08-20~experimental - 2023-06-03~experimental @@ -736,6 +742,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-04~experimental x-snyk-api-version: 2021-06-04~experimental @@ -765,6 +773,8 @@ paths: tags: - Users x-snyk-api-lifecycle: sunset + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2023-06-01~experimental - 2023-06-02~experimental diff --git a/testdata/output/2023-06-03~experimental/spec.json b/testdata/output/2023-06-03~experimental/spec.json index 2556b587..5761e93c 100644 --- a/testdata/output/2023-06-03~experimental/spec.json +++ b/testdata/output/2023-06-03~experimental/spec.json @@ -659,6 +659,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-13~beta" ], @@ -739,6 +742,9 @@ "$ref": "#/components/responses/500" } }, + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-01~experimental", "2021-06-07~experimental", @@ -985,6 +991,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-06-04~experimental" ], @@ -1058,6 +1067,9 @@ "tags": [ "Projects" ], + "x-snyk-api-owners": [ + "@snyk/api" + ], "x-snyk-api-releases": [ "2021-08-20~experimental", "2023-06-03~experimental" diff --git a/testdata/output/2023-06-03~experimental/spec.yaml b/testdata/output/2023-06-03~experimental/spec.yaml index 5b049eb8..ebeafeaf 100644 --- a/testdata/output/2023-06-03~experimental/spec.yaml +++ b/testdata/output/2023-06-03~experimental/spec.yaml @@ -478,6 +478,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-13~beta x-snyk-api-version: 2021-06-13~beta @@ -529,6 +531,8 @@ paths: $ref: '#/components/responses/404' "500": $ref: '#/components/responses/500' + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-01~experimental - 2021-06-07~experimental @@ -642,6 +646,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-08-20~experimental - 2023-06-03~experimental @@ -734,6 +740,8 @@ paths: $ref: '#/components/responses/500' tags: - Projects + x-snyk-api-owners: + - '@snyk/api' x-snyk-api-releases: - 2021-06-04~experimental x-snyk-api-version: 2021-06-04~experimental