Message schemas

cornice_sphinx does not yet have the ability to render documentation for the /message-schemas/ API, so we will include docblock documentation for that service here instead.

class bodhi.server.services.schemas.MessageSchemasV1(request: pyramid.request.Request, context: None = None)[source]

Bases: object

Defines resources for serving Bodhi’s message schemas.

Operations acting on the collection are served at /message-schemas/v1/ and operations acting on a single schema are served at /message-schemas/v1/<topic>.

static __acl__() → Iterable[Tuple[str, str, str]][source]

Define ACLs for the MessageSchemas resource.

Returns:A list of ACLs for this Resource.
__init__(request: pyramid.request.Request, context: None = None)[source]

Initialize the MessageSchemas resource.

Parameters:
  • request – The current web request.
  • context – Unused.
__weakref__

list of weak references to the object (if defined)

collection_get() → Iterable[str][source]

List schemas.

This method responds to the /message-schemas/v1/ endpoint.

Returns:A list of message topics that Bodhi supports.
get() → dict[source]

Retrieve and render a single message schema.

This API responses to the /message_schemas/v1/<topic> endpoint.

Returns:The requested message schema.