diff --git a/api/docs.go b/api/docs.go index 415832eeff7731a29612a3872556a7e1cda8e441..e7e569e77cc8434b4e170fa762a615a0206480f5 100644 --- a/api/docs.go +++ b/api/docs.go @@ -137,58 +137,6 @@ const docTemplate = `{ } } }, - "/api/5/bridge/{location}": { - "get": { - "security": [ - { - "BucketTokenAuth": [] - } - ], - "description": "fetch bridges by location", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Provisioning" - ], - "summary": "Get Bridges", - "parameters": [ - { - "type": "string", - "description": "Location ID", - "name": "location", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.Bridge" - } - } - }, - "400": { - "description": "Bad Request", - "schema": {} - }, - "404": { - "description": "Not Found", - "schema": {} - }, - "500": { - "description": "Internal Server Error", - "schema": {} - } - } - } - }, "/api/5/bridges": { "get": { "security": [ diff --git a/api/swagger.json b/api/swagger.json index 6693c087616873657ce3a0fc0059a3771b90dd07..ac1925a14e4ba52bde9ffec2cc30302734177ba2 100644 --- a/api/swagger.json +++ b/api/swagger.json @@ -131,58 +131,6 @@ } } }, - "/api/5/bridge/{location}": { - "get": { - "security": [ - { - "BucketTokenAuth": [] - } - ], - "description": "fetch bridges by location", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Provisioning" - ], - "summary": "Get Bridges", - "parameters": [ - { - "type": "string", - "description": "Location ID", - "name": "location", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.Bridge" - } - } - }, - "400": { - "description": "Bad Request", - "schema": {} - }, - "404": { - "description": "Not Found", - "schema": {} - }, - "500": { - "description": "Internal Server Error", - "schema": {} - } - } - } - }, "/api/5/bridges": { "get": { "security": [ diff --git a/api/swagger.yaml b/api/swagger.yaml index 006743d17ddbd606aa7b9461db234f35c7261003..fef1e9aab71184b869c7a4ccc6f5b6301f52c7e8 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -371,40 +371,6 @@ paths: summary: Register a gateway tags: - Agent - /api/5/bridge/{location}: - get: - consumes: - - application/json - description: fetch bridges by location - parameters: - - description: Location ID - in: path - name: location - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - $ref: '#/definitions/models.Bridge' - type: array - "400": - description: Bad Request - schema: {} - "404": - description: Not Found - schema: {} - "500": - description: Internal Server Error - schema: {} - security: - - BucketTokenAuth: [] - summary: Get Bridges - tags: - - Provisioning /api/5/bridges: get: consumes: diff --git a/client/provisioning/provisioning_client.go b/client/provisioning/provisioning_client.go index efef717ebe3d9ce10b34c5e14a8b7b5b6705855b..34ccb9ecbd59d656e242961b67fb66d171237460 100644 --- a/client/provisioning/provisioning_client.go +++ b/client/provisioning/provisioning_client.go @@ -80,8 +80,6 @@ func WithAcceptTextPlain(r *runtime.ClientOperation) { // ClientService is the interface for Client methods type ClientService interface { - GetAPI5BridgeLocation(params *GetAPI5BridgeLocationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApi5BridgeLocationOK, error) - GetAPI5Bridges(params *GetAPI5BridgesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApi5BridgesOK, error) GetAPI5Gateways(params *GetAPI5GatewaysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApi5GatewaysOK, error) @@ -99,47 +97,6 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } -/* -GetAPI5BridgeLocation gets bridges - -fetch bridges by location -*/ -func (a *Client) GetAPI5BridgeLocation(params *GetAPI5BridgeLocationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApi5BridgeLocationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAPI5BridgeLocationParams() - } - op := &runtime.ClientOperation{ - ID: "GetAPI5BridgeLocation", - Method: "GET", - PathPattern: "/api/5/bridge/{location}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetAPI5BridgeLocationReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetApi5BridgeLocationOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetAPI5BridgeLocation: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* GetAPI5Bridges gets all bridges