fix test spec
This commit is contained in:
@@ -215,6 +215,17 @@ func TestdataOpenAPIExtension() (*datasourceV0.DataSourceOpenAPIExtension, error
|
||||
},
|
||||
},
|
||||
},
|
||||
"/test/json": {
|
||||
PathProps: spec3.PathProps{
|
||||
Summary: "Echo json request",
|
||||
Post: &spec3.Operation{
|
||||
OperationProps: spec3.OperationProps{
|
||||
RequestBody: unstructuredRequest,
|
||||
Responses: unstructuredResponse,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"/sims": {
|
||||
PathProps: spec3.PathProps{
|
||||
Description: "Get list of simulations",
|
||||
@@ -260,10 +271,5 @@ func TestdataOpenAPIExtension() (*datasourceV0.DataSourceOpenAPIExtension, error
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Duplicate the test route (but with a new path)
|
||||
testcopy := *oas.Routes["/test"]
|
||||
oas.Routes["/test/json"] = &testcopy
|
||||
|
||||
return oas, nil
|
||||
}
|
||||
|
||||
+2
-2
@@ -804,7 +804,7 @@
|
||||
"tags": [
|
||||
"Route"
|
||||
],
|
||||
"operationId": "post_route_test_json",
|
||||
"operationId": "post_route_test",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
@@ -852,7 +852,7 @@
|
||||
]
|
||||
},
|
||||
"/apis/testdata.datasource.grafana.app/v0alpha1/namespaces/{namespace}/datasources/{name}/resource/test/json": {
|
||||
"summary": "Echo any request",
|
||||
"summary": "Echo json request",
|
||||
"post": {
|
||||
"tags": [
|
||||
"Route"
|
||||
|
||||
Reference in New Issue
Block a user