fix: add Swagger file to httphandler package

This commit is contained in:
Vlad Klokun
2022-08-01 21:29:51 +03:00
parent be92c0a3e1
commit 40e8dd3575
+55 -2
View File
@@ -111,7 +111,6 @@ definitions:
x-go-name: Type
type: object
x-go-package: github.com/armosec/opa-utils/httpserver/meta/v1
host: 192.168.49.2:31379
info:
description: 'The Kubescape Microservice API allows clients to interact with a Kubescape
instance running in a Kubernetes cluster: trigger scans, retrieve and delete their
@@ -209,7 +208,7 @@ paths:
"204":
$ref: '#/responses/scanResponse'
"400":
$ref: '#/responses/scanResponse'
$ref: '#/responses/scanResponseError'
summary: Returns results of a scan
tags:
- scanning
@@ -281,6 +280,60 @@ responses:
description: A Scan Response object
schema:
$ref: '#/definitions/Response'
scanResponseError:
description: ""
schema:
allOf:
- properties:
id:
description: ID of the scan
example: d13791eb-19b1-4222-867b-9a7c1799cfac
format: uuid4
type: string
x-go-name: ID
response:
description: The actual Response object
example:
some: other
type: object
x-go-name: Response
type:
description: |-
Type of this response
id IDScanResponseType Deprecated: will return busy/notBusy instead
error ErrorScanResponseType A response contains an error message
v1results ResultsV1ScanResponseType A response contains a v1 Results object
busy BusyScanResponseType A response indicates that a server is busy with another request
notBusy NotBusyScanResponseType A response indicates server is not busy with another request
ready ReadyScanResponseType A response indicates that a server has successfully completed the request
enum:
- id
- error
- v1results
- busy
- notBusy
- ready
example: busy
type: string
x-go-enum-desc: |-
id IDScanResponseType Deprecated: will return busy/notBusy instead
error ErrorScanResponseType A response contains an error message
v1results ResultsV1ScanResponseType A response contains a v1 Results object
busy BusyScanResponseType A response indicates that a server is busy with another request
notBusy NotBusyScanResponseType A response indicates server is not busy with another request
ready ReadyScanResponseType A response indicates that a server has successfully completed the request
x-go-name: Type
type: object
- properties:
response:
example: '"an error occurred"'
type: object
x-go-name: Resp
type:
example: error
type: string
x-go-name: Type
type: object
schemes:
- http
swagger: "2.0"