fix: [CODE-2352]: fix repo listing open api (#2676)

* fix: [CODE-2352]: fix repo listing open api
CODE-2402
Abhinav Singh 2024-09-10 16:42:03 +00:00 committed by Harness
parent 1e5030d25e
commit 50dc7f1d2c
1 changed files with 1 additions and 15 deletions

View File

@ -93,20 +93,6 @@ var queryParameterQueryRepo = openapi3.ParameterOrRef{
},
}
var queryParameterRecursive = openapi3.ParameterOrRef{
Parameter: &openapi3.Parameter{
Name: request.QueryParamQuery,
In: openapi3.ParameterInQuery,
Description: ptr.String("The boolean used to do space recursive op on repos."),
Required: ptr.Bool(false),
Schema: &openapi3.SchemaOrRef{
Schema: &openapi3.Schema{
Type: ptrSchemaType(openapi3.SchemaTypeBoolean),
},
},
},
}
var queryParameterSortSpace = openapi3.ParameterOrRef{
Parameter: &openapi3.Parameter{
Name: request.QueryParamSort,
@ -331,7 +317,7 @@ func spaceOperations(reflector *openapi3.Reflector) {
opRepos.WithTags("space")
opRepos.WithMapOfAnything(map[string]interface{}{"operationId": "listRepos"})
opRepos.WithParameters(queryParameterQueryRepo, queryParameterSortRepo, queryParameterOrder,
QueryParameterPage, QueryParameterLimit, queryParameterRecursive)
QueryParameterPage, QueryParameterLimit)
_ = reflector.SetRequest(&opRepos, new(spaceRequest), http.MethodGet)
_ = reflector.SetJSONResponse(&opRepos, []types.Repository{}, http.StatusOK)
_ = reflector.SetJSONResponse(&opRepos, new(usererror.Error), http.StatusInternalServerError)