openapi: 3.0.0

info:
  title: My API
  version: '0.1'

paths:
  /books/{bookId}:

    get:
      summary: get book details
      description: get details for a book

      parameters:
        - $ref: "#/components/parameters/bookId"

      responses:
        '200':
          description: successfully retrieved book details

          content:
            application/json:
              schema:
                title: book details
                type: object

                required:
                  - author
                  - title

                properties:
                  author:
                    title: book author name
                    type: string

                  title:
                    title: book title
                    type: string

components:
  parameters:
    bookId:
      in: path
      name: bookId
      description: book ID
      required: true

      schema:
        title: ID
        type: string
        