Commit c3da7c35 authored by Grant's avatar Grant
Browse files

add sizes to images & add examples

parent 7fdbd04c
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ properties:
    type: array
    description: Logos sorted by priority
    items:
      $ref: URLWithMime.yml
      $ref: Image.yml
  endpoints:
    $ref: EventEndpoints.yml
  social:
@@ -36,6 +36,7 @@ examples:
    logos:
      - type: image/png
        url: https://example.url
        size: 128x128
    endpoints:
      open: https://canvas.fediverse.events
      auth_open: https://canvas.fediverse.events/api/login
@@ -60,6 +61,7 @@ examples:
    logos:
      - type: image/png
        url: https://example.url
        size: 128x128
    endpoints:
      open: https://canvas.toast.ooo
      more_info: https://toast.ooo/c/canvas
+16 −0
Original line number Diff line number Diff line
allOf:
  - $ref: URLWithMime.yml
  - required:
      - size
    properties:
      size:
        type: string
        example: 64x64
        default: 512x512
        enum:
          - 16x16
          - 32x32
          - 64x64
          - 128x128
          - 256x256
          - 512x512
+3 −0
Original line number Diff line number Diff line
@@ -6,6 +6,9 @@ properties:
  type:
    type: string
    description: Mime type
    examples:
      - image/png
      - image/svg+xml
  url:
    type: string
    format: url
+25 −3
Original line number Diff line number Diff line
# AUTOGENERATED FILE
# Run bunx bundle:api-doc
# Run bun run bundle:api-doc
openapi: 3.1.1
info:
  title: Fediverse Events API
  version: '1.0'
  version: 0.0.1
  license:
    name: MIT
    identifier: MIT
@@ -164,9 +164,29 @@ components:
        type:
          type: string
          description: Mime type
          examples:
            - image/png
            - image/svg+xml
        url:
          type: string
          format: url
    Image:
      allOf:
        - $ref: '#/components/schemas/URLWithMime'
        - required:
            - size
          properties:
            size:
              type: string
              example: 64x64
              default: 512x512
              enum:
                - 16x16
                - 32x32
                - 64x64
                - 128x128
                - 256x256
                - 512x512
    EventEndpoints:
      type: object
      properties:
@@ -230,7 +250,7 @@ components:
          type: array
          description: Logos sorted by priority
          items:
            $ref: '#/components/schemas/URLWithMime'
            $ref: '#/components/schemas/Image'
        endpoints:
          $ref: '#/components/schemas/EventEndpoints'
        social:
@@ -243,6 +263,7 @@ components:
          logos:
            - type: image/png
              url: https://example.url
              size: 128x128
          endpoints:
            open: https://canvas.fediverse.events
            auth_open: https://canvas.fediverse.events/api/login
@@ -267,6 +288,7 @@ components:
          logos:
            - type: image/png
              url: https://example.url
              size: 128x128
          endpoints:
            open: https://canvas.toast.ooo
            more_info: https://toast.ooo/c/canvas
+1 −1
Original line number Diff line number Diff line
openapi: "3.1.1"
info:
  title: Fediverse Events API
  version: "1.0"
  version: "0.0.1"
  license:
    name: MIT
    identifier: MIT
Loading