diff --git a/guidelines/errors-example.json b/guidelines/errors-example.json index b88acfc..b9d2b8e 100644 --- a/guidelines/errors-example.json +++ b/guidelines/errors-example.json @@ -2,7 +2,7 @@ "errors": [ { "request_id": "1dc92f06-8ede-4fb4-8921-b507601fb59d", - "code": "orchestration.create-failed", + "code": "orchestration.create_failed", "status": 418, "title": "The Stack could not be created", "detail": "The Stack could not be created because of error(s) in other parts of the system.", diff --git a/guidelines/errors-schema.json b/guidelines/errors-schema.json index 48aba7a..370f63a 100644 --- a/guidelines/errors-schema.json +++ b/guidelines/errors-schema.json @@ -17,7 +17,8 @@ }, "code": { "type": "string", - "description": "A service-specific error code. The general form of the code is service-type.error-code. service-type MUST be the service type as defined by the service types authority at http://specs.openstack.org/openstack/service-types-authority. error-code is defined by service project team and MUST only consist of lowercase alpha, numeric, '.', and '-' characters." + "pattern": "^[a-z0-9._-]+$", + "description": "A service-specific error code. The general form of the code is service-type.error-code. service-type MUST be the service type as defined by the service types authority at http://specs.openstack.org/openstack/service-types-authority. error-code is defined by service project team and MUST only consist of lowercase alpha, numeric, '.', '_', and '-' characters." }, "status": { "type": "integer",