# 获取-图书详情

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/books/{id}:
    get:
      summary: 获取-图书详情
      deprecated: false
      description: 获取图书详情数据
      tags:
        - 图书管理
        - AJAX编程/图书管理
      parameters:
        - name: id
          in: path
          description: 图书id
          required: true
          example: '1'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: 响应消息
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        title: 图书id
                      bookname:
                        type: string
                        title: 图书名字
                      author:
                        type: string
                        title: 图书作者
                      publisher:
                        type: string
                        title: 图书出版社
                    required:
                      - id
                      - bookname
                      - author
                      - publisher
                    x-apifox-orders:
                      - id
                      - bookname
                      - author
                      - publisher
                    title: 响应数据
                required:
                  - message
                  - data
                x-apifox-orders:
                  - message
                  - data
              example:
                message: 查询图书详情成功
                data:
                  id: 84861
                  bookname: 《西游记》
                  author: 吴承恩
                  publisher: 人民文学出版社
          headers: {}
          x-apifox-name: 成功
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: 响应消息
                  data:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    title: 响应数据
                required:
                  - message
                  - data
                x-apifox-orders:
                  - message
                  - data
              example:
                message: 未找到对应图书
                data: {}
          headers: {}
          x-apifox-name: 请求参数有误
      security: []
      x-apifox-folder: 图书管理
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/1937884/apis/api-49760212-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
