diff --git a/README.md b/README.md
index 9a6f68c..0f4d605 100644
--- a/README.md
+++ b/README.md
@@ -23,44 +23,71 @@ When necessary, a Problem Detail response _MAY_ include additional detail on the
```json
{
- "$schema": "https://json-schema.org/draft/2019-09/schema",
- "type": "object",
- "description": "an extension object used to enrich problem details responses for SmartBear APIs",
- "properties": {
- "errors": {
- "type": "array",
- "description": "an array of error details to accompany a problem details response",
- "items": [
- {
- "type": "object",
- "description": "an error object to provide explicit details on a problem towards an API consumer",
- "properties": {
- "detail": {
- "type": "string",
- "description": "a granular description on the specific error related to a body property, query parameter, path parameters, and/or header"
- },
- "pointer": {
- "type": "string",
- "description": "a JSON Pointer to a specific request body property that is the source of error"
- },
- "parameter": {
- "type": "string",
- "description": "the name of the query or path parameter that is the source of error"
- },
- "header": {
- "type": "string",
- "description": "the name of the header that is the source of error"
- }
- },
- "required": [
- "detail"
- ]
- }
- ]
- }
- },
- "required": [
- "errors"
- ]
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "a string containing a URI reference that identifies the problem type. When this member is not present, its value is assumed to be `about:blank`."
+ },
+ "status": {
+ "type": "number",
+ "description": "a number indicating the HTTP status code."
+ },
+ "title": {
+ "type": "string",
+ "description": "a string containing a short, human-readable summary of the problem type."
+ },
+ "detail": {
+ "type": "string",
+ "description": "a string containing a human-readable explanation specific to this occurrence of the problem."
+ },
+ "instance": {
+ "type": "string",
+ "description": "a string containing a URI reference that identifies the specific occurrence of the problem."
+ },
+ "code": {
+ "type": "string",
+ "description": "a string containing additional provider specific codes to identify the error context."
+ },
+ "errors": {
+ "type": "array",
+ "description": "an array of error details to accompany a problem details response",
+ "items": [
+ {
+ "type": "object",
+ "description": "an error object to provide explicit details on a problem towards an API consumer",
+ "properties": {
+ "detail": {
+ "type": "string",
+ "description": "a granular description on the specific error related to a body property, query parameter, path parameters, and/or header"
+ },
+ "pointer": {
+ "type": "string",
+ "description": "a JSON Pointer to a specific request body property that is the source of error"
+ },
+ "parameter": {
+ "type": "string",
+ "description": "a string containing the name of the query or path parameter that is the source of error"
+ },
+ "header": {
+ "type": "string",
+ "description": "a string containing the name of the header that is the source of error"
+ },
+ "code": {
+ "type": "string",
+ "description": "a string containing additional provider specific codes to identify the error context."
+ }
+ },
+ "required": [
+ "detail"
+ ]
+ }
+ ]
+ }
+ },
+ "required": [
+ "title"
+ ]
}
```
diff --git a/src/pages/already-exists.md b/src/pages/already-exists.md
index 5511bf7..ede8d10 100644
--- a/src/pages/already-exists.md
+++ b/src/pages/already-exists.md
@@ -14,7 +14,7 @@ Your client application tried to create a resource that already exists. Perhaps
**Example of an `already-exists` problem details:**
-```yaml
+```json
{
"type": "https://problems-registry.smartbear.com/already-exists",
"title": "Already exists",
diff --git a/src/pages/bad-request.md b/src/pages/bad-request.md
index 59c1a2a..64dcca3 100644
--- a/src/pages/bad-request.md
+++ b/src/pages/bad-request.md
@@ -15,7 +15,7 @@ Your client application initiated a request that is malformed. Please review you
**Examples of a `bad-request` problem details:**
-```yaml
+```json
{
"type": "https://problems-registry.smartbear.com/bad-request",
"title": "Bad Request",
@@ -25,7 +25,7 @@ Your client application initiated a request that is malformed. Please review you
}
```
-```yaml
+```json
{
"type": "about:blank",
"title": "Bad Request",
diff --git a/src/pages/business-rule-violation.md b/src/pages/business-rule-violation.md
index 8450a2c..ff91cab 100644
--- a/src/pages/business-rule-violation.md
+++ b/src/pages/business-rule-violation.md
@@ -14,7 +14,7 @@ Your client issued a request that failed business rule validation. Please review
**Example of an `business-rule-violation` problem details:**
-```yaml
+```json
{
"type": "https://problems-registry.smartbear.com/business-rule-violation",
"title": "Business Rule Violation",
diff --git a/src/pages/forbidden.md b/src/pages/forbidden.md
index e13720c..23ee8a9 100644
--- a/src/pages/forbidden.md
+++ b/src/pages/forbidden.md
@@ -15,7 +15,7 @@ Your client application tried to perform an operation on a resource that it's no
**Examples of a `forbidden` problem details:**
-```yaml
+```json
{
"type": "https://problems-registry.smartbear.com/forbidden",
"title": "Forbidden",
@@ -25,7 +25,7 @@ Your client application tried to perform an operation on a resource that it's no
}
```
-```yaml
+```json
{
"type": "about:blank",
"title": "Forbidden",
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 26c6a3e..e85a4fc 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -63,7 +63,17 @@ import Card from '../components/Card.astro';
href="./business-rule-violation"
title="Business Rule Violation"
body="The request is deemed invalid as it failed business rule checks 🏢"
- />
+ />
+
diff --git a/src/pages/invalid-body-property-format.md b/src/pages/invalid-body-property-format.md index 28099a4..3a0cfc7 100644 --- a/src/pages/invalid-body-property-format.md +++ b/src/pages/invalid-body-property-format.md @@ -14,7 +14,7 @@ Your client issued a request that contained a malformed body property. Please re **Example of an `invalid-body-property-format` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/invalid-body-property-format", "title": "Invalid Body Property Format", diff --git a/src/pages/invalid-body-property-value.md b/src/pages/invalid-body-property-value.md index 49bf705..c0fbc8a 100644 --- a/src/pages/invalid-body-property-value.md +++ b/src/pages/invalid-body-property-value.md @@ -14,7 +14,7 @@ Your client issued a request that contained an invalid body property value. Plea **Example of an `invalid-body-property-value` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/invalid-body-property-value", "title": "Invalid Body Property Value", diff --git a/src/pages/invalid-parameters.md b/src/pages/invalid-parameters.md index e4d3440..51bd2a0 100644 --- a/src/pages/invalid-parameters.md +++ b/src/pages/invalid-parameters.md @@ -10,7 +10,7 @@ Your client application issued a request to an API that contains invalid or malf **Example of an `invalid-parameters` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/invalid-parameters", "title": "Invalid parameters", diff --git a/src/pages/invalid-request-header-format.md b/src/pages/invalid-request-header-format.md index 4ee02a2..531f44d 100644 --- a/src/pages/invalid-request-header-format.md +++ b/src/pages/invalid-request-header-format.md @@ -14,7 +14,7 @@ Your client issued a request that contained a malformed request header. Please r **Example of an `invalid-request-header-format` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/invalid-request-header-format", "title": "Invalid Request Header Format", diff --git a/src/pages/invalid-request-parameter-format.md b/src/pages/invalid-request-parameter-format.md index 44d4fb1..22dd49f 100644 --- a/src/pages/invalid-request-parameter-format.md +++ b/src/pages/invalid-request-parameter-format.md @@ -14,7 +14,7 @@ Your client issued a request that contained a malformed query or path parameter. **Example of an `invalid-request-parameter-format` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/invalid-request-parameter-format", "title": "Invalid Request Parameter Format", diff --git a/src/pages/invalid-request-parameter-value.md b/src/pages/invalid-request-parameter-value.md index df4e478..96b5568 100644 --- a/src/pages/invalid-request-parameter-value.md +++ b/src/pages/invalid-request-parameter-value.md @@ -14,7 +14,7 @@ Your client issued a request that contained an invalid query or path parameter v **Example of an `invalid-request-parameter-value` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/invalid-request-parameter-value", "title": "Invalid Request Parameter Value", diff --git a/src/pages/license-cancelled.md b/src/pages/license-cancelled.md new file mode 100644 index 0000000..cb5c987 --- /dev/null +++ b/src/pages/license-cancelled.md @@ -0,0 +1,25 @@ +--- +layout: ../layouts/Problem.astro +title: License Cancelled +description: This problem occurs when the license associated with the client has been cancelled thus rendering the service unavailable. +--- + +The license associated with your client/organization has been cancelled. Please contact your SmartBear account manager or representative. + +| Type URI | Title | Recommended HTTP Status Code | Reference | +|----------|-------|------------------------------|-----------| +|https://problems-registry.smartbear.com/license-cancelled|License Cancelled|503|| + +> **Note** A problem is generally **not** meant to be used for end-user input validation, but for client developer convenience. + + +**Example of an `license-expired` problem details:** +```json +{ + "type": "https://problems-registry.smartbear.com/license-cancelled", + "title": "License Cancelled", + "detail": "The service is unavailable as the license associated with your client or organization has been cancelled. Please contact your SmartBear account manager or representative", + "status": 503 +} +``` + diff --git a/src/pages/license-expired.md b/src/pages/license-expired.md new file mode 100644 index 0000000..7acd88c --- /dev/null +++ b/src/pages/license-expired.md @@ -0,0 +1,25 @@ +--- +layout: ../layouts/Problem.astro +title: License Expired +description: This problem occurs when the license associated with the client has expired thus rendering the service unavailable. +--- + +The license associated with your client/organization has expired. Please contact your SmartBear account manager or representative. + +| Type URI | Title | Recommended HTTP Status Code | Reference | +|----------|-------|------------------------------|-----------| +|https://problems-registry.smartbear.com/license-expired|License Expired|503|| + +> **Note** A problem is generally **not** meant to be used for end-user input validation, but for client developer convenience. + + +**Example of an `license-expired` problem details:** +```json +{ + "type": "https://problems-registry.smartbear.com/license-expired", + "title": "License Expired", + "detail": "The service is unavailable as the license associated with your client or organization has expired. Please contact your SmartBear account manager or representative", + "status": 503 +} +``` + diff --git a/src/pages/missing-body-property.md b/src/pages/missing-body-property.md index 7b12675..7b2a851 100644 --- a/src/pages/missing-body-property.md +++ b/src/pages/missing-body-property.md @@ -14,7 +14,7 @@ Your client issued a request that omitted an expected body property. Please revi **Example of an `missing-body-property` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/missing-body-property", "title": "Missing body property", diff --git a/src/pages/missing-request-header.md b/src/pages/missing-request-header.md index 2993a18..acedbce 100644 --- a/src/pages/missing-request-header.md +++ b/src/pages/missing-request-header.md @@ -14,7 +14,7 @@ Your client issued a request that omitted an expected request header. Please rev **Example of an `missing-request-header` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/missing-request-header", "title": "Missing request header", diff --git a/src/pages/missing-request-parameter.md b/src/pages/missing-request-parameter.md index f0c038e..cfcb1b6 100644 --- a/src/pages/missing-request-parameter.md +++ b/src/pages/missing-request-parameter.md @@ -14,7 +14,7 @@ Your client issued a request that omitted an expected query or path par. Please **Example of an `missing-request-parameter` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/missing-request-parameter", "title": "Missing request parameter", diff --git a/src/pages/not-found.md b/src/pages/not-found.md index 90859a1..09f31c0 100644 --- a/src/pages/not-found.md +++ b/src/pages/not-found.md @@ -16,7 +16,7 @@ Your client application tried to access a resource that does not exist (or could **Examples of an `not-found` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/not-found", "title": "Not Found", @@ -26,7 +26,7 @@ Your client application tried to access a resource that does not exist (or could } ``` -```yaml +```json { "type": "about:blank", "title": "Not Found", diff --git a/src/pages/server-error.md b/src/pages/server-error.md index 3181e03..52ca59a 100644 --- a/src/pages/server-error.md +++ b/src/pages/server-error.md @@ -15,7 +15,7 @@ Your client application did everything correct. Unfortunately our API encountere **Examples of a `server-error` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/server-error", "title": "Server Error", @@ -25,7 +25,7 @@ Your client application did everything correct. Unfortunately our API encountere } ``` -```yaml +```json { "type": "about:blank", "title": "Server Error", diff --git a/src/pages/service-unavailable.md b/src/pages/service-unavailable.md index 314e165..f5c0220 100644 --- a/src/pages/service-unavailable.md +++ b/src/pages/service-unavailable.md @@ -15,7 +15,7 @@ Your client application did everything correct. Unfortunately our API is current **Examples of a `service-unavailable` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/service-unavailable", "title": "Service Unavailable", @@ -25,7 +25,7 @@ Your client application did everything correct. Unfortunately our API is current } ``` -```yaml +```json { "type": "about:blank", "title": "Service Unavailable", diff --git a/src/pages/unauthorized.md b/src/pages/unauthorized.md index 54946c2..918b94e 100644 --- a/src/pages/unauthorized.md +++ b/src/pages/unauthorized.md @@ -15,7 +15,7 @@ Your client application issued a requested to a protected resource without suppl **Examples of an `unauthorized` problem details:** -```yaml +```json { "type": "https://problems-registry.smartbear.com/unauthorized", "title": "Unauthorized", @@ -25,7 +25,7 @@ Your client application issued a requested to a protected resource without suppl } ``` -```yaml +```json { "type": "about:blank", "title": "Unauthorized",