File tree Expand file tree Collapse file tree 2 files changed +0
-46
lines changed
tools/api-docs-generator/generator Expand file tree Collapse file tree 2 files changed +0
-46
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,6 @@ func processOperation(pathURL string,
152152 }
153153 }
154154
155- if isBeta (operation ) {
156- continue
157- }
158-
159155 tag += spec .Suffix
160156 specDocs [tag ] = append (specDocs [tag ], operationPath {
161157 operation : operation ,
@@ -169,18 +165,6 @@ func processOperation(pathURL string,
169165 return nil
170166}
171167
172- func isBeta (operation * openapi3.Operation ) bool {
173- apiStabilityExtension , ok := operation .Extensions ["x-snyk-api-stability" ]
174- if ! ok || apiStabilityExtension == nil {
175- return false
176- }
177- stabilityStr , ok := apiStabilityExtension .(string )
178- if ! ok {
179- return false
180- }
181- return stabilityStr == "beta"
182- }
183-
184168func extractCategoryNameFromExtension (extension interface {}) (string , error ) {
185169 extensionMap , worked := extension .(map [string ]interface {})
186170 if ! worked {
Original file line number Diff line number Diff line change @@ -294,36 +294,6 @@ func Test_aggregateSpecs(t *testing.T) {
294294 },
295295 wantErr : assert .NoError ,
296296 },
297- {
298- name : "filters out beta paths" ,
299- args : args {
300- cfg : & config.Config {
301- Specs : []config.Spec {
302- {
303- Path : "spec_with_stability.yaml" ,
304- },
305- },
306- },
307- docsBasePath : "../testdata/reference_docs/" ,
308- },
309- want : map [string ][]operationPath {
310- "stable" : {
311- {
312- method : "GET" ,
313- specPath : "spec_with_stability.yaml" ,
314- pathURL : "/stable-path" ,
315- },
316- },
317- "no-stability" : {
318- {
319- method : "GET" ,
320- specPath : "spec_with_stability.yaml" ,
321- pathURL : "/no-stability-path" ,
322- },
323- },
324- },
325- wantErr : assert .NoError ,
326- },
327297 }
328298 for _ , tt := range tests {
329299 t .Run (tt .name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments