github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/codegen/existing-model.yml (about) 1 swagger: "2.0" 2 3 info: 4 version: "1.0" 5 title: "Existing model" 6 description: | 7 Sample API, which uses existing Go type to implement Swagger definition. 8 9 produces: 10 - "application/json" 11 12 consumes: 13 - "application/json" 14 15 paths: 16 /keys: 17 get: 18 description: "Get a JSON Web Key Set" 19 tags: 20 - "jwk" 21 operationId: "GetJWKSet" 22 responses: 23 200: 24 description: "OK" 25 examples: 26 application/json: 27 keys: 28 - kid: "" 29 kty: "" 30 schema: 31 $ref: "#/definitions/JsonWebKeySet" 32 /key: 33 get: 34 description: "Get JSON Web Key" 35 tags: 36 - "jwk" 37 operationId: "GetJWK" 38 responses: 39 200: 40 description: "OK" 41 schema: 42 $ref: "#/definitions/JsonWebKeySet" 43 definitions: 44 JsonWebKeySet: 45 title: "JSON Web Key Set" 46 type: "object" 47 properties: 48 keys: 49 type: "array" 50 items: 51 $ref: "#/definitions/JsonWebKey" 52 x-go-type: 53 import: 54 package: "github.com/user/package" 55 alias: "jwk" 56 type: "KeysObject" 57 JsonWebKeySetArray: 58 title: "JSON Web Key Set Array" 59 type: "array" 60 items: 61 $ref: "#/definitions/JsonWebKey" 62 x-go-type: 63 import: 64 package: "github.com/user/package" 65 alias: "jwk" 66 type: "KeysArray" 67 JsonWebKey: 68 title: "JSON Web Key" 69 type: "object" 70 properties: 71 keys: 72 type: "array" 73 items: 74 $ref: "#/definitions/JsonWebKey" 75 kty: 76 type: "string" 77 use: 78 type: "string" 79 kid: 80 type: "string" 81 alg: 82 type: "string" 83 crv: 84 type: "string" 85 x: 86 type: "string" 87 "y": 88 type: "string" 89 d: 90 type: "string" 91 "n": 92 type: "string" 93 e: 94 type: "string" 95 k: 96 type: "string" 97 required: 98 - kty 99 x-go-type: 100 import: 101 package: "github.com/user/package" 102 alias: "jwk" 103 type: "Key"