All Downloads are FREE. Search and download functionalities are using the official Maven repository.

icroprofile.openapi.microprofile-openapi-tck.4.0.2.source-code.simpleapi.yaml Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
openapi: 3.1.0
servers:
  - description: MySimpleAPI
    url: https:///MySimpleAPI/1.0.0
info:
  description: This is a simple API
  version: "1.0.0"
  title: Simple Inventory API
  contact:
    email: [email protected]
  license:
    name: Apache 2.0
    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
tags:
  - name: admins
    description: Secured Admin-only calls
  - name: developers
    description: Operations available to regular developers
paths:
  /inventory:
    get:
      tags:
        - developers
      summary: searches inventory
      operationId: searchInventory
      description: |
        By passing in the appropriate options, you can search for
        available inventory in the system
      parameters:
        - in: query
          name: searchString
          description: pass an optional search string for looking up inventory
          required: false
          schema:
            type: string
        - in: query
          name: skip
          description: number of records to skip for pagination
          schema:
            type: integer
            format: int32
            minimum: 0
        - in: query
          name: limit
          description: maximum number of records to return
          schema:
            type: integer
            format: int32
            minimum: 0
            maximum: 50
      responses:
        '200':
          description: search results matching criteria
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InventoryItem'
        '400':
          description: bad input parameter
    post:
      tags:
        - admins
      summary: adds an inventory item
      operationId: addInventory
      description: Adds an item to the system
      responses:
        '201':
          description: item created
        '400':
          description: 'invalid input, object invalid'
        '409':
          description: an existing item already exists
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InventoryItem'
        description: Inventory item to add
    put:
      summary: put operation
      operationId: putInventory
      description: tests the put operation
      responses:
        '200':
          description: put operation tested
    delete:
      summary: delete operation
      operationId: deleteInventory
      description: tests the delete operation
      responses:
        '200':
          description: delete operation tested
    options:
      summary: options operation
      operationId: optionsInventory
      description: tests the options operation
      responses:
        '200':
          description: options operation tested
    head:
      summary: head operation
      operationId: headInventory
      description: tests the head operation
      responses:
        '200':
          description: head operation tested
    patch:
      summary: patch operation
      operationId: patchInventory
      description: tests the patch operation
      responses:
        '200':
          description: patch operation tested
    trace:
      summary: trace operation
      operationId: traceInventory
      description: tests the trace operation
      responses:
        '200':
          description: trace operation tested
  /refpath/{id}:
    $ref: '#/components/pathItems/idCrud'
    get:
      responses:
        '200':
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/InventoryItem'
webhooks:
  bookingEvent:
    put:
      summary: Notifies that a booking has been created
      requestBody:
        content:
          'application/json':
            schema:
              $ref: '#/components/schemas/Booking'
      responses:
        '204':
          description: Indicates that the creation event was processed successfully
    delete:
      summary: Notifies that a booking has been deleted
      requestBody:
        content:
          'application/json':
            schema:
              $ref: '#/components/schemas/Booking'
      responses:
        '204':
          description: Indicates that the deletion event was processed successfully
components:
  schemas:
    InventoryItem:
      type: object
      required:
        - id
        - name
        - manufacturer
        - releaseDate
      properties:
        id:
          type: string
          format: uuid
          examples:
            - d290f1ee-6c54-4b01-90e6-d701748f0851
        name:
          type: string
          examples:
            - Widget Adapter
        releaseDate:
          type: string
          format: int32
          examples:
            - '2016-08-29T09:12:33.001Z'
        manufacturer:
          $ref: '#/components/schemas/Manufacturer'
    Manufacturer:
      required:
        - name
      properties:
        name:
          type: string
          examples:
            - ACME Corporation
        homePage:
          type: string
          format: url
          examples:
            - 'https://www.acme-corp.com'
        phone:
          type: string
          examples:
            - 408-867-5309
      type: object
  pathItems:
    idCrud:
      delete:
        responses:
          '202':
            description: Delete item
      parameters:
        - name: id
          in: path
          description: The item parameter
          required: true




© 2015 - 2024 Weber Informatics LLC | Privacy Policy