-
Notifications
You must be signed in to change notification settings - Fork 1
Add OpenAPI spec for the LDP HTTP API #8
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationprotocolProtocol specification changesProtocol specification changes
Description
Summary
LDP defines three HTTP endpoints (/ldp/identity, /ldp/capabilities, /ldp/messages) but has no machine-readable API spec. An OpenAPI 3.1 spec would enable auto-generated clients in any language and interactive API docs.
What to do
- Create
docs/openapi.yaml(or.json) - Document the three endpoints with request/response schemas
- Define JSON Schema components for all protocol types:
LdpIdentityCardLdpCapability,QualityMetricsLdpEnvelope,LdpMessageBody(all 12 message types)Provenance,TrustDomain,PayloadMode
- Include example requests and responses
References
- HTTP endpoints: see README.md "HTTP API" section
- Message types:
sdk/python/src/ldp_protocol/types/messages.py - Identity card:
sdk/python/src/ldp_protocol/types/identity.py - Protocol spec:
docs/RFC.md
Why this matters
An OpenAPI spec lets anyone generate a client in their language without writing an SDK from scratch. It also serves as a testable contract for protocol conformance.
Acceptance criteria
- Valid OpenAPI 3.1 spec (passes
swagger-cli validate) - All three endpoints documented
- All message types have schemas with examples
- Schema matches the Python SDK pydantic models
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationprotocolProtocol specification changesProtocol specification changes