Last active
October 3, 2023 22:00
-
-
Save DavidBiesack/b6446b4525b46edbc4514a85b80e0aa0 to your computer and use it in GitHub Desktop.
OpenAPI definition of the Read operation for the Universe resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: '3.1.0' | |
info: | |
title: Read a Universe instance. | |
description: Part of the Chain Links API. | |
contact: | |
name: David Biesack | |
url: https://gist.github.com/DavidBiesack | |
version: 0.0.0 | |
tags: | |
- name: Universes | |
description: A universe in which Chains (fan fiction stories) exist | |
servers: | |
- url: https://api.chainlinks.example.com | |
paths: | |
/universes/{universeId}: | |
parameters: | |
- $ref: '#/components/parameters/universeIdPathParam' | |
get: | |
summary: Read a Universe instance. | |
description: >- | |
Return the representation of a Chain Link Universe. | |
operationId: getUniverse | |
tags: | |
- Universes | |
responses: | |
'200': | |
description: OK. The operation succeeded. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/universe' | |
'404': | |
$ref: 'common.yaml#/components/responses/404' | |
components: | |
parameters: | |
universeIdPathParam: | |
name: universeId | |
description: The unique `id` of an existing Universe instance. | |
in: path | |
required: true | |
schema: | |
type: string | |
minLength: 4 | |
maxLength: 48 | |
pattern: ^[-_a-zA-Z0-9:+$]{4,48}$ | |
schemas: | |
universe: | |
title: Universe | |
description: >- | |
A universe in which authors can | |
create new characters and new chains. | |
type: object | |
required: | |
- id | |
- name | |
- description | |
- createdAt | |
- creator_url | |
- characters_url | |
- chains_url | |
unevaluatedProperties: false | |
properties: | |
id: | |
$ref: 'common.yaml#/components/schemas/resourceId' | |
name: | |
description: The name of the universe. | |
minLength: 4 | |
maxLength: 64 | |
description: | |
description: The description of the universe. | |
minLength: 4 | |
maxLength: 512 | |
sourceUniverse_url: | |
description: >- | |
An optional universe that this one is derived from. | |
type: string | |
format: uri_reference | |
createdAt: | |
description: >- | |
The date and time the author created universe, | |
in RFC 3339 date-time format. | |
type: string | |
format: date-time | |
creator_url: | |
description: The URL of this universe's creator/author. | |
type: string | |
format: uri-reference | |
characters_url: | |
description: >- | |
The URL of the API operation to list | |
the characters that exist in this universe. | |
type: string | |
format: uri-reference | |
chains_url: | |
description: >- | |
The URL of the API operation to list | |
the chains that exist in this universe. | |
type: string | |
format: uri-reference | |
example: | |
id: uni-489f34dhj37sghj | |
name: DragonTerr | |
description: >- | |
A world where dragons rule, but not without challengers. | |
createdAt: '2023-08-23T18:34:10.444Z' | |
creator_url: /authors/au-ndklxhjf8933x0 | |
characters_url: /characters?universe=uni-489f34dhj37sghj | |
chains_url: /chains?universe=uni-489f34dhj37sghj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment