Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

Commit

Permalink
add bulk update endpoint to swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Skelcy committed Mar 14, 2018
1 parent 133a812 commit 8509281
Showing 1 changed file with 127 additions and 7 deletions.
134 changes: 127 additions & 7 deletions public/r2/v1/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,71 @@
"tags":[
"namespaces"
],
"summary": "Bulk update endpoint for namespace changes",
"operationId": "bulkUpdateRuleSet",
"consumes": [
"application/json"
]
"summary": "Bulk update endpoint for namespace changes",
"operationId": "bulkUpdateRuleSet",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "namespaceID",
"description": "The name of the namespace",
"type": "string",
"required": true
},
{
"in": "body",
"name": "ruleset-change",
"description": "The updates to the ruleset",
"required": true,
"schema": {
"$ref": "#/definitions/RuleSetChange"
}
},
{
"in": "body",
"name": "rule-set-version",
"description": "The ruleset version to update, for check and set operations",
"required": false,
"type": "integer"
},
{
"in": "body",
"name": "atomic",
"description": "flag to apply the changes atomically",
"required": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "The ruleset updates have been applied",
"schema": {
"$ref": "#/definitions/ApiResponse"
}
},
"404": {
"description": "No such namespace",
"schema": {
"$ref": "#/definitions/ApiResponse"
}
},
"409": {
"description": "Namespace already exists",
"schema": {
"$ref": "#/definitions/ApiResponse"
},
"500": {
"description": "Something went horribly wrong",
"schema": {
"$ref": "#/definitions/ApiResponse"
}
}
}
}
},
"/namespaces/{namespaceID}/ruleset/validate": {
Expand Down Expand Up @@ -875,20 +935,80 @@
"type": "integer",
"format": "unixMillis"
},
"mappingRules": {
"mappingRulesChanges": {
"type": "array",
"items": {
"$ref": "#/definitions/MappingRule"
}
},
"rollupRules": {
"rollupRulesChanges": {
"type": "array",
"items": {
"$ref": "#/definitions/RollupRule"
}
}
}
},
"RuleSetChange": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["add", "remove", "change"],
"description": "type of operation on rule set"
},
"MappingRuleChanges": {
"type": "array",
"items": {
"$ref": "#/definitions/MappingRuleChange"
},
"description": "list of mapping rule diffs"
},
"RollupRuleChanges": {
"type": "array",
"items": {
"$ref": "#/definitions/RollupRuleChange"
},
"description": "list of rollup rule diffs"
}
}
},
"MappingRuleChange": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["add", "remove", "change"],
"description": "type of operation on rule"
},
"from": {
"type": "#/definitions/MappingRule",
"description": "old version of rule"
},
"to": {
"type": "#/definitions/MappingRule",
"description": "new version of rule"
}
}
},
"RollupRuleChange": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["add", "remove", "change"],
"description": "type of operation on rule"
},
"from": {
"type": "#/definitions/RollupRule",
"description": "old version of rule"
},
"to": {
"type": "#/definitions/RollupRule",
"description": "new version of rule"
}
}
},
"Policies": {
"type": "array",
"items": {
Expand Down

0 comments on commit 8509281

Please sign in to comment.