File: fixture-342.yaml

package info (click to toggle)
golang-github-go-openapi-validate 0.24.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,040 kB
  • sloc: sh: 11; makefile: 6
file content (66 lines) | stat: -rw-r--r-- 1,783 bytes parent folder | download | duplicates (3)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
swagger: '2.0'
info:
  title: issue-342
  description: |
    Original issue: a spec which triggers a panic because of invalid type assertion on parameters.
    Specifically, this tests how validation carries on when references returns an unexpected object.
    This may happen for parameters and responses and should be accurately reported.
  version: 0.0.1
  license:
    name: MIT
host: localhost:8081
basePath: /api/v1
schemes:
  - http
consumes:
  - application/json
produces:
  - application/json
paths:
  /get_main_object:
    get:
      tags:
        - maindata
      parameters:
        - name: pquery1
          in: query
          required: true
          $ref: "#/definitions/sample_info/properties/sid"  # <-- error: a whole schema replaces the parameter
        - $ref: "#/parameters/wrong"  # <-- error: wrong param props
        - $ref: "#/parameters/notbetter"  # <-- error: wrong param schema
        - $ref: "#/parameters/stillnogood"  # <-- error: wrong param schema
        - name: pquery2
          in: query
          required: true
          $ref: "nowhere.yaml#/definitions/sample_info/properties/sid"  # <-- error: expand ref error
        - name: sid
          in: body
          required: true
          $ref: "#/definitions/sample_info/properties/sid"  # <-- error: a whole schema replaces the parameter
      responses:
        '200':

parameters:
  wrong:
    theName: wrongNameProperty
    theType: wrongTypePropery
  notbetter:
    type: object
    properties:
      whenDidThatHappen:
        type: string
        format: date
  stillnogood:
    schema:
      type: object
      properties:
        aintnogood:
          type: integer
definitions:
  sample_info:
    type: object
    properties:
      sid:
        type: string
        format: uuid