Commit 629b6e5d authored by Grant's avatar Grant
Browse files

openapi spec + mock implementation

parent f36b8be0
Loading
Loading
Loading
Loading
Loading

openapi/definitions.yml

deleted100644 → 0
+0 −54
Original line number Diff line number Diff line
Event:
  type: object
  x-tags:
    - events
  required:
    - id
    - name
    - start
    - logos
    - endpoints
  properties:
    id:
      type: string
    name:
      type: string
    start:
      type: string
      format: date-time
    end:
      type: string
      format: date-time
      nullable: true
    logos:
      type: array
      description: Logos sorted by priority
      items:
        $ref: "#/URLWithMime"
    endpoints:
      $ref: "#/EventEndpoints"
EventEndpoints:
  type: object
  properties:
    open:
      type: string
      format: url
      nullable: true
      description: URL to open the event
    more_info:
      type: string
      format: url
      nullable: true
      description: URL for more information
URLWithMime:
  type: object
  required:
    - type
    - url
  properties:
    type:
      type: string
      description: Mime type
    url:
      type: string
      format: url
+11 −0
Original line number Diff line number Diff line
type: object
required:
  - error
  - error_message
properties:
  error:
    type: string
    description: Error code
  error_message:
    type: string
    description: Human readable error message
+68 −0
Original line number Diff line number Diff line
type: object
x-tags:
  - events
required:
  - id
  - name
  - start
  - logos
  - endpoints
  - social
properties:
  id:
    type: string
  name:
    type: string
  start:
    type: string
    format: date-time
  end:
    type: string
    format: date-time
  logos:
    type: array
    description: Logos sorted by priority
    items:
      $ref: URLWithMime.yml
  endpoints:
    $ref: EventEndpoints.yml
  social:
    $ref: EventSocial.yml
examples:
  - id: 123CANVAS001
    name: Canvas 2024
    start: "2024-07-12T04:00:00.000Z"
    end: "2024-07-16T04:00:00.000Z"
    logos:
      - type: image/png
        url: https://example.url
    endpoints:
      open: https://canvas.fediverse.events
      more_info: https://fediverse.events/canvas
    social:
      - label: Community
        icon: lemmy
        url: https://toast.ooo/c/canvas
      - label: Announcements
        icon: mastodon
        url: https://social.fediverse.events/@canvas
      - label: Matrix Space
        icon: matrix
        url: https://matrix.to/#/#canvas:aftermath.gg?via=matrix.org
      - label: Discord
        icon: discord
        url: https://discord.gg/mEUqXZw8kR
  - id: 123CANVAS000
    name: Canvas 2023
    start: "2023-08-04T16:00:00.000Z"
    end: "2023-08-07T03:59:00.000Z"
    logos:
      - type: image/png
        url: https://example.url
    endpoints:
      open: https://canvas.toast.ooo
      more_info: https://toast.ooo/c/canvas
    social:
      - label: Community
        icon: lemmy
        url: https://toast.ooo/c/canvas
+10 −0
Original line number Diff line number Diff line
type: object
properties:
  open:
    type: string
    format: url
    description: URL to open the event
  more_info:
    type: string
    format: url
    description: URL for more information
+21 −0
Original line number Diff line number Diff line
type: array
items:
  type: object
  required:
    - label
    - icon
    - url
  properties:
    label:
      type: string
    icon:
      type: string
      default: other
      enum:
        - other
        - mastodon
        - lemmy
        - matrix
        - discord
    url:
      type: string
Loading