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

templates.openapi-3.0.yaml Maven / Gradle / Ivy

The newest version!
---
openapi: 3.0.0
info:
  title: {service}
  description: This is a generic API definition for manipulation of {resource} resources. It contains basic CRUD operations for {resource} resources.
  version: {version}
paths:
  /{resource}:
    get:
      summary: Retrieve {resource} resources.
      description: Retrieve a bunch of {resource} resources. Specify example resource as body payload.
      operationId: get{resource}List
      responses:
        200:
          description: Get an array of {resource} resources.
    post:
      summary: Create new {resource} resource.
      description: Create a new {resource} resource. Specify payload within request body.
      operationId: create{resource}
      requestBody:
        description: The payload of resource {resource} to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schema/{resource}Type'
      responses:
        201:
          description: Get the newly created {resource} resource.
  /{resource}/{id}:
    get:
      summary: Retrieve a {resource} resource.
      description: Retrieve an already existing {resource} resource having the specified id.
      operationId: get{resource}ById
      responses:
        200:
          description: {resource} resource having specified id.
          content:
            application/json:
              schema:
                $ref: '#/components/schema/{resource}Type'
    put:
      summary: Update a {resource} resource.
      description: Update an already existing {resource} resource having the specified id.
      operationId: update{resource}ById
      requestBody:
        description: The payload of resource {resource} to update.
        content:
          application/json:
            schema:
              $ref: '#/components/schema/{resource}Type'
      responses:
        200:
          description: Updated {resource} resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schema/{resource}Type'
    delete:
      summary: Delete a {resource} resource.
      description: Remove an existing {resource} resource having the specified id.
      operationId: delete{resource}ById
      responses:
        204:
          description: Resource {resource} with specified id has been removed.
    parameters:
      - name: id
        in: path
        description: Id of resource
        required: true
        schema:
          type: string
components:
  schemas:
    {resource}Type:
      {resourceSchema}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy