EOAP Problems Registry
Project description
EOAP Problems Registry
EOAP Problems Registry is a shared registry of API problem detail types for EOAP services. The problem responses conform to RFC 9457, formerly RFC 7807, and are published as documentation, JSON Schema/OpenAPI artifacts, and a Python package with generated Pydantic models.
The registry is intended to give API providers and consumers a common vocabulary for reusable application/problem+json responses.
What Is Included
schemas/schema.yaml: JSON Schema definitions for the commonProblemDetails,ErrorDetail, and each registered EOAP problem type.schemas/openapi.yaml: reusable OpenAPI 3.1 response components and examples that reference the JSON Schema definitions.src/eoap_problems_registry: generated Pydantic models for the registry.docs/: MkDocs pages for each problem type, plus generated JSON Schema and OpenAPI documentation.tests/: unit tests that verify generated problem models and extension behavior..github/workflows/: documentation deployment, package CI, and PyPI release automation.
Registered Problems
EOAP-specific problem types:
| Problem type | HTTP status |
|---|---|
| Already Exists | 409 |
| Missing Body Property | 400 |
| Missing Request Header | 400 |
| Missing Request Parameter | 400 |
| Invalid Body Property Format | 400 |
| Invalid Request Parameter Format | 400 |
| Invalid Request Header Format | 400 |
| Invalid Body Property Value | 400 |
| Invalid Request Parameter Value | 400 |
| Validation Error | 422 |
| Business Rule Violation | 422 |
| License Expired | 503 |
| License Cancelled | 503 |
Common convenience problem types:
| Problem type | HTTP status |
|---|---|
| Bad Request | 400 |
| Unauthorized | 401 |
| Forbidden | 403 |
| Not Found | 404 |
| Invalid Parameters | 400 |
| Server Error | 500 |
| Service Unavailable | 503 |
For generic/common HTTP problem types, prefer the IANA HTTP Problem Types registry when it fits your use case.
Python Usage
Install the package in an environment with Pydantic 2:
pip install eoap-problems-registry
Use the generated models to build responses with fixed registry fields and optional extension members:
import eoap_problems_registry as registry
problem = registry.MissingRequestParameter(
instance="https://api.example.test/problems/abc123",
code="400-03",
errors=[
registry.ErrorDetail(
detail="The query parameter limit is required.",
parameter="limit",
)
],
correlation_id="req-123",
)
payload = problem.model_dump(mode="json", exclude_none=True)
The resulting payload includes the registered type, status, title, and detail values:
{
"instance": "https://api.example.test/problems/abc123",
"code": "400-03",
"errors": [
{
"detail": "The query parameter limit is required.",
"parameter": "limit"
}
],
"type": "https://eoap.github.io/problems-registry/missing-request-parameter",
"status": 400,
"title": "Missing request parameter",
"detail": "The request is missing an expected query or path parameter.",
"correlation_id": "req-123"
}
ProblemDetails and ErrorDetail allow additional provider-specific fields, while generated problem classes use Pydantic literal fields to protect the registered type, status, title, and detail values.
Schemas And OpenAPI
Use the schema and OpenAPI files directly when integrating the registry into API descriptions:
- JSON Schema definitions:
schemas/schema.yaml - OpenAPI response components and examples:
schemas/openapi.yaml - Published documentation: https://eoap.github.io/problems-registry/
When a response needs more context, include an errors array. Each item must contain detail and may include pointer, parameter, header, code, or provider-specific extension fields.
Development
This repository uses Hatch for Python environments, Ruff for formatting/linting, MkDocs for documentation, and Taskfile tasks for generated artifacts.
Useful commands:
hatch run test:test
hatch run test:testv
hatch run test:cov
hatch run dev:lint
hatch run dev:check
task process_schema
task generate_openapi_docs
task serve_docs
task process_schema regenerates the Pydantic models in src/eoap_problems_registry/__init__.py and the JSON Schema documentation in docs/json-schema.md.
task generate_openapi_docs regenerates the static OpenAPI documentation under docs/openapi/.
task serve_docs starts the MkDocs site locally.
Contributing Problem Types
To add or update a problem type:
- Update
schemas/schema.yamlwith the JSON Schema definition under$defs. - Update
schemas/openapi.yamlif the problem should be exposed through reusable OpenAPI response components or examples. - Add or update the matching Markdown page in
docs/. - Add the page to the
navsection inmkdocs.yaml. - Run
task process_schemato regenerate the Python models and schema docs. - Run
task generate_openapi_docsif OpenAPI components or examples changed. - Add or update tests in
tests/when generated behavior changes. - Run the test and lint commands before opening a pull request.
Problem type URIs should use the published registry base URL:
https://eoap.github.io/problems-registry/{problem-name}
Use hyphen-separated names for problem page filenames and URI suffixes, for example missing-body-property.
CI And Releases
The package workflow runs Ruff and the unit test suite on Python 3.10 through 3.14 for pushes and pull requests targeting the active development branches. Version tags matching v*.*.* build and publish the package to PyPI after verifying that the tag version matches hatch version.
The docs workflow publishes the MkDocs site to GitHub Pages when documentation-related files change on docs, develop, or main.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eoap_problems_registry-1.0.1.tar.gz.
File metadata
- Download URL: eoap_problems_registry-1.0.1.tar.gz
- Upload date:
- Size: 107.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88d3059f18dfb63209004bc7a90905b5291ec26586e625008da4b95dd4816ef1
|
|
| MD5 |
73794d57589a845d5829a7080e04abfa
|
|
| BLAKE2b-256 |
e1cedc77872aac9d50adf210fa6fcf087a01e3365cd74fbcd81db9066c939a07
|
Provenance
The following attestation bundles were made for eoap_problems_registry-1.0.1.tar.gz:
Publisher:
package.yaml on eoap/problems-registry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eoap_problems_registry-1.0.1.tar.gz -
Subject digest:
88d3059f18dfb63209004bc7a90905b5291ec26586e625008da4b95dd4816ef1 - Sigstore transparency entry: 2206803878
- Sigstore integration time:
-
Permalink:
eoap/problems-registry@d1611f950bfb0205bcef794ea1d37a2b4eac2782 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/eoap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yaml@d1611f950bfb0205bcef794ea1d37a2b4eac2782 -
Trigger Event:
push
-
Statement type:
File details
Details for the file eoap_problems_registry-1.0.1-py3-none-any.whl.
File metadata
- Download URL: eoap_problems_registry-1.0.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23115a804082271fe6c9603b678fed7168d952f5c5a9d09f3b2b70bd6db995b0
|
|
| MD5 |
c7b19ddce249dc1c9a072edcfbc73fb4
|
|
| BLAKE2b-256 |
5c225fc0b1108e88b47c8c910449dddd480ba45f3d0a262dd460b489b07db04b
|
Provenance
The following attestation bundles were made for eoap_problems_registry-1.0.1-py3-none-any.whl:
Publisher:
package.yaml on eoap/problems-registry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eoap_problems_registry-1.0.1-py3-none-any.whl -
Subject digest:
23115a804082271fe6c9603b678fed7168d952f5c5a9d09f3b2b70bd6db995b0 - Sigstore transparency entry: 2206803897
- Sigstore integration time:
-
Permalink:
eoap/problems-registry@d1611f950bfb0205bcef794ea1d37a2b4eac2782 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/eoap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yaml@d1611f950bfb0205bcef794ea1d37a2b4eac2782 -
Trigger Event:
push
-
Statement type: