# 修改-图书详情

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/books/{id}:
    put:
      summary: 修改-图书详情
      deprecated: false
      description: 修改图书详情
      tags:
        - 图书管理
        - AJAX编程/图书管理
      parameters:
        - name: id
          in: path
          description: 图书id
          required: true
          example: '1'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                bookname:
                  type: string
                  title: 图书名字
                author:
                  type: string
                  title: 图书作者
                publisher:
                  type: string
                  title: 图书出版社
                creator:
                  type: string
                  title: 图书创建者
                  description: 写上自己名字-管理自己的数据
              x-apifox-orders:
                - bookname
                - author
                - publisher
                - creator
              required:
                - bookname
                - author
                - publisher
                - creator
            example:
              bookname: 黑马程序员
              author: 小马
              publisher: 北京出版社
              creator: 老李
      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: 84863
                  bookname: 黑马程序员
                  author: 小马
                  publisher: 北京出版社
          headers: {}
          x-apifox-name: 成功
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    title: 业务状态码
                  message:
                    type: string
                    title: 响应消息
                  data:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    title: 响应数据
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: 400001
                message: 校验失败:请检查必填项字段:bookname
                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-49760210-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
