Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions ipa/general/0114.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ paths:

</Guideline>

</Guidelines>

### Authentication and Authorization

<Guidelines>

<Guideline id="IPA-114-must-document-401-403" given="operation" enforcement="review" effort="check">

APIs **must** document `401 Unauthorized` and `403 Forbidden` status codes for
Expand Down Expand Up @@ -305,8 +309,12 @@ have permission to access the resource.

</Guideline>

</Guidelines>

### Not Found

<Guidelines>

<Guideline id="IPA-114-must-document-404" given="operation" enforcement="review" effort="check">

APIs **must** document the `404 Not Found` status code when the resource
Expand Down Expand Up @@ -390,6 +398,8 @@ invalid or non-existent ID

</Guideline>

</Guidelines>

:::tip

For path parameters consider applying regex-based routing to ensure invalid IDs
Expand All @@ -410,6 +420,8 @@ Validation errors typically occur when:
- Values fall outside acceptable ranges
- Business rules are violated

<Guidelines>

<Guideline id="IPA-114-must-return-400-on-validation-failure" given="operation" enforcement="review" effort="explore" implementation>

APIs **must** return a `400 Bad Request` status code when validation fails
Expand Down Expand Up @@ -561,8 +573,12 @@ request and include all validation errors in the field `badRequestDetail`

</Guideline>

</Guidelines>

### Rate Limiting

<Guidelines>

<Guideline id="IPA-114-must-document-429" given="operation" enforcement="review" effort="check">

APIs **must** document the `429 Too Many Requests` status code for endpoints
Expand Down Expand Up @@ -760,7 +776,7 @@ RateLimit-Remaining: 73
}
```

Example
Example:

```json
{
Expand Down Expand Up @@ -788,7 +804,7 @@ Example
}
```

:::tip
:::info

New fields `badRequestDetail` and `help` are inspired by
[googleapis/google/rpc/error_details.proto](https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto)
Expand Down