Commit 18232d7e authored by Matija Čupić's avatar Matija Čupić

Extract Variable into separate JSON Schema

parent 434a6158
......@@ -19,7 +19,7 @@ describe Groups::VariablesController do
it 'renders the ci_group_variable as json' do
subject
expect(response).to match_response_schema('variable')
expect(response).to match_response_schema('variables')
end
end
......@@ -85,7 +85,7 @@ describe Groups::VariablesController do
it 'has all variables in response' do
subject
expect(response).to match_response_schema('variable')
expect(response).to match_response_schema('variables')
end
end
......@@ -111,7 +111,7 @@ describe Groups::VariablesController do
it 'has all variables in response' do
subject
expect(json_response['variables'].count).to eq(0)
expect(response).to match_response_schema('variables')
end
end
end
......
......@@ -24,7 +24,7 @@ describe Projects::VariablesController do
it 'renders the ci_variable as json' do
subject
expect(response).to match_response_schema('variable')
expect(response).to match_response_schema('variables')
end
end
......@@ -94,7 +94,7 @@ describe Projects::VariablesController do
it 'has all variables in response' do
subject
expect(response).to match_response_schema('variable')
expect(response).to match_response_schema('variables')
end
end
......@@ -120,7 +120,7 @@ describe Projects::VariablesController do
it 'has all variables in response' do
subject
expect(json_response['variables'].count).to eq(0)
expect(response).to match_response_schema('variables')
end
end
end
......
{
"type": "object",
"required": ["variables"],
"properties": {
"variables": {
"type": "array",
"items": {
"required": [
"id",
"key",
......@@ -16,9 +11,6 @@
"key": { "type": "string" },
"value": { "type": "string" },
"protected": { "type": "boolean" }
}
}
}
},
"additionalProperties": false
}
{
"type": "object",
"required": ["variables"],
"properties": {
"variables": {
"type": "array",
"items": { "$ref": "variable.json" }
}
},
"additionalProperties": false
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment