File: read_only_write_only.yaml

package info (click to toggle)
python-openapi-core 0.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,104 kB
  • sloc: python: 19,979; makefile: 44
file content (40 lines) | stat: -rw-r--r-- 889 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
openapi: "3.0.0"
info:
  title: Specification Containing readOnly
  version: "0.1"
paths:
  /users:
    post:
        operationId: createUser
        requestBody:
          description: Post data for creating a user
          required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        responses:
          default:
            description: Create a user
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/User'
components:
  schemas:
    User:
      x-model: User
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          format: int32
          readOnly: true
        name:
          type: string
        hidden:
          type: boolean
          writeOnly: true