|
| 1 | +swagger: "2.0" |
| 2 | +info: |
| 3 | + description: "This is a sample client side for Delphi Instance Registry." |
| 4 | + version: "1.0.0" |
| 5 | + title: "Delphi Instance Registry" |
| 6 | +host: "localhost:8085" |
| 7 | +consumes: |
| 8 | + - "application/json" |
| 9 | +produces: |
| 10 | + - "application/json" |
| 11 | +basePath: "/" |
| 12 | +tags: |
| 13 | +- name: "instance" |
| 14 | + description: "Anything about Instances" |
| 15 | +schemes: |
| 16 | +- "https" |
| 17 | +- "http" |
| 18 | +paths: |
| 19 | + /register: |
| 20 | + post: |
| 21 | + tags: |
| 22 | + - "instance" |
| 23 | + summary: "Register New Instance" |
| 24 | + description: "Register New Instances" |
| 25 | + operationId: "addInstance" |
| 26 | + parameters: |
| 27 | + - in: "body" |
| 28 | + name: "Registering" |
| 29 | + description: "Data to Register Instance" |
| 30 | + required: true |
| 31 | + schema: |
| 32 | + $ref: "#/definitions/Instance" |
| 33 | + responses: |
| 34 | + 200: |
| 35 | + description: "Registeration Successful" |
| 36 | + 405: |
| 37 | + description: "Invalid input" |
| 38 | + /deregister: |
| 39 | + post: |
| 40 | + tags: |
| 41 | + - "instance" |
| 42 | + summary: "Deregister" |
| 43 | + description: "Delete an Instance" |
| 44 | + operationId: "deleteInstance" |
| 45 | + parameters: |
| 46 | + - in: "body" |
| 47 | + name: "Instance" |
| 48 | + description: "Details of Instance to be deleted" |
| 49 | + required: true |
| 50 | + schema: |
| 51 | + $ref: "#/definitions/InstanceID" |
| 52 | + responses: |
| 53 | + 200: |
| 54 | + description: "Sucessfully Deregistered" |
| 55 | + 400: |
| 56 | + description: "Invalid Status Value" |
| 57 | + 404: |
| 58 | + description: "Instance not found" |
| 59 | + 405: |
| 60 | + description: "Validation exception" |
| 61 | + |
| 62 | + /matchingInstance: |
| 63 | + get: |
| 64 | + tags: |
| 65 | + - "instance" |
| 66 | + summary: " Get Matching Instances" |
| 67 | + operationId: "matchInstance" |
| 68 | + parameters: |
| 69 | + - name: "ComponentType" |
| 70 | + in: "query" |
| 71 | + description: "Component to be fetched" |
| 72 | + required: true |
| 73 | + type: "string" |
| 74 | + enum: |
| 75 | + - "Crawler" |
| 76 | + - "WebApi" |
| 77 | + - "WebApp" |
| 78 | + - "DelphiManagement" |
| 79 | + responses: |
| 80 | + 200: |
| 81 | + $ref: "#/definitions/Instance" |
| 82 | + 400: |
| 83 | + description: "Invalid status value" |
| 84 | + /instances: |
| 85 | + get: |
| 86 | + tags: |
| 87 | + - "instance" |
| 88 | + summary: "Fetch Instances" |
| 89 | + description: "Fetch Specific Instance" |
| 90 | + operationId: "fetchInstance" |
| 91 | + parameters: |
| 92 | + - name: "ComponentType" |
| 93 | + in: "query" |
| 94 | + type: "string" |
| 95 | + required: true |
| 96 | + enum: |
| 97 | + - "Crawler" |
| 98 | + - "WebApi" |
| 99 | + - "WebApp" |
| 100 | + - "DelphiManagement" |
| 101 | + responses: |
| 102 | + 200: |
| 103 | + description: "successful operation" |
| 104 | + schema: |
| 105 | + type: "array" |
| 106 | + items: |
| 107 | + $ref: "#/definitions/Instance" |
| 108 | + 400: |
| 109 | + description: "Invalid value" |
| 110 | + /numberOfInstances: |
| 111 | + get: |
| 112 | + tags: |
| 113 | + - "instance" |
| 114 | + summary: "Find number of running instances" |
| 115 | + description: "How many instances per type are running" |
| 116 | + operationId: "getInstanceNumber" |
| 117 | + |
| 118 | + parameters: |
| 119 | + - name: "ComponentType" |
| 120 | + in: "query" |
| 121 | + type: "string" |
| 122 | + required: true |
| 123 | + enum: |
| 124 | + - "Crawler" |
| 125 | + - "WebApi" |
| 126 | + - "WebApp" |
| 127 | + - "DelphiManagement" |
| 128 | + responses: |
| 129 | + 200: |
| 130 | + description: "successful operation" |
| 131 | + schema: |
| 132 | + type: "integer" |
| 133 | + format: "int32" |
| 134 | + 400: |
| 135 | + description: "Invalid ID supplied" |
| 136 | + 404: |
| 137 | + description: "Instances not found" |
| 138 | + /matchingResult: |
| 139 | + post: |
| 140 | + tags: |
| 141 | + - "instance" |
| 142 | + summary: "Find the matching instance" |
| 143 | + description: "Match the instance" |
| 144 | + operationId: "getMatchingInstance" |
| 145 | + parameters: |
| 146 | + - name: "MatchingSuccessful" |
| 147 | + in: "query" |
| 148 | + description: "Boolean to indicate if matching is successful" |
| 149 | + required: true |
| 150 | + type: "boolean" |
| 151 | + - name: "Component" |
| 152 | + in: "body" |
| 153 | + description: "Registering Instance" |
| 154 | + required: true |
| 155 | + schema: |
| 156 | + $ref: "#/definitions/Instance" |
| 157 | + responses: |
| 158 | + 200: |
| 159 | + description: "successful operation" |
| 160 | + 400: |
| 161 | + description: "Invalid ID supplied" |
| 162 | + 404: |
| 163 | + description: "No match found" |
| 164 | +definitions: |
| 165 | + Instance: |
| 166 | + type: "object" |
| 167 | + properties: |
| 168 | + ID: |
| 169 | + type: "integer" |
| 170 | + format: "int64" |
| 171 | + IP: |
| 172 | + type: "string" |
| 173 | + portnumber: |
| 174 | + type: "integer" |
| 175 | + format: "int64" |
| 176 | + name: |
| 177 | + type: "string" |
| 178 | + ComponentType: |
| 179 | + type: "string" |
| 180 | + description: "Component Type" |
| 181 | + enum: |
| 182 | + - "Crawler" |
| 183 | + - "WebApi" |
| 184 | + - "WebApp" |
| 185 | + - "DelphiManagement" |
| 186 | + InstanceID: |
| 187 | + type: "object" |
| 188 | + properties: |
| 189 | + ID: |
| 190 | + type: "integer" |
| 191 | + format: "int64" |
0 commit comments