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:
LdpIdentityCard
LdpCapability, QualityMetrics
LdpEnvelope, 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
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
docs/openapi.yaml(or.json)LdpIdentityCardLdpCapability,QualityMetricsLdpEnvelope,LdpMessageBody(all 12 message types)Provenance,TrustDomain,PayloadModeReferences
sdk/python/src/ldp_protocol/types/messages.pysdk/python/src/ldp_protocol/types/identity.pydocs/RFC.mdWhy 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
swagger-cli validate)