Skip to content

helper sub: URI to the current operation in the OpenAPI specification document #20

@karenetheridge

Description

@karenetheridge

Depends on #4.
Given we are serving up the API on its own endpoint, we know the URI to that API, so we can provide a link, including fragment, to the part of the document that defines the current operation.

lets us do things like this (which could also be provided as another helper sub):

# add a Link: uri; rel="describedby" header to the response, linking to the schema definition
$c->res->header('Link' => $c->current_operation_uri->clone->host($c->req->headers->host)) . '; rel="describedby"';

Metadata

Metadata

Assignees

No one assigned

    Labels

    dispatchingthings to help with runtime dispatching

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions