Skip to content

Commit

Permalink
Swagger updates
Browse files Browse the repository at this point in the history
- Change references from Host Credential to Credential
- Add failed_scans to ScanJob model (should have been there)
  • Loading branch information
kholdaway committed Nov 30, 2017
1 parent 225069c commit 64a9200
Showing 1 changed file with 36 additions and 32 deletions.
68 changes: 36 additions & 32 deletions docs/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ paths:
post:
tags:
- "Credential"
summary: "Add a new host credential"
description: "Create a new host credential for use when connecting to a target system."
summary: "Add a new credential"
description: "Create a new credential for use when connecting to a target system."
operationId: "addCredential"
consumes:
- "application/json"
Expand All @@ -55,33 +55,33 @@ paths:
parameters:
- in: "body"
name: "body"
description: "Host credential object that needs to be stored"
description: "Credential object that needs to be stored"
required: true
schema:
$ref: "#/definitions/Credential"
responses:
201:
description: "Host credential created"
description: "Credential created"
schema:
$ref: "#/definitions/CredentialOut"
400:
description: "Invalid input"
get:
tags:
- "Credential"
summary: "List exsiting host credentials"
description: "List all host credential for use when connecting to a target system."
summary: "List exsiting credentials"
description: "List all credential for use when connecting to a target system."
operationId: "listCredentials"
produces:
- "application/json"
parameters:
- name: "name"
in: "query"
description: "A list of names representing host credentials"
description: "A list of names representing credentials"
type: "string"
responses:
200:
description: "Host credential retrieved"
description: "Credential retrieved"
schema:
type: "array"
items:
Expand All @@ -90,30 +90,30 @@ paths:
get:
tags:
- "Credential"
summary: "Get an existing host credential"
description: "Get a host credential for use when connecting to a target system."
summary: "Get an existing credential"
description: "Get a credential for use when connecting to a target system."
operationId: "getCredential"
produces:
- "application/json"
parameters:
- name: "cred_id"
in: "path"
description: "ID of host credential to retrieve"
description: "ID of credential to retrieve"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "Host credential retrieved"
description: "Credential retrieved"
schema:
$ref: "#/definitions/CredentialOut"
404:
description: "Host credential not found"
description: "Credential not found"
put:
tags:
- "Credential"
summary: "Update an existing host credential"
description: "Update a host credential for use when connecting to a target system."
summary: "Update an existing credential"
description: "Update a credential for use when connecting to a target system."
operationId: "updateCredential"
consumes:
- "application/json"
Expand All @@ -122,45 +122,45 @@ paths:
parameters:
- name: "cred_id"
in: "path"
description: "ID of host credential to update"
description: "ID of credential to update"
required: true
type: "integer"
format: "int64"
- in: "body"
name: "body"
description: "Host credential object that needs to be modified"
description: "Credential object that needs to be modified"
required: true
schema:
$ref: "#/definitions/Credential"
responses:
200:
description: "Host credential updated"
description: "Credential updated"
schema:
$ref: "#/definitions/CredentialOut"
400:
description: "Invalid input"
404:
description: "Host credential not found"
description: "Credential not found"
delete:
tags:
- "Credential"
summary: "Delete an existing host credential"
description: "Delete a host credential for use when connecting to a target system."
summary: "Delete an existing credential"
description: "Delete a credential for use when connecting to a target system."
operationId: "deleteCredential"
produces:
- "application/json"
parameters:
- name: "cred_id"
in: "path"
description: "ID of host credential to delete"
description: "ID of credential to delete"
required: true
type: "integer"
format: "int64"
responses:
204:
description: "Host credential deleted"
description: "Credential deleted"
404:
description: "Host credential not found"
description: "Credential not found"
/reports/:
get:
tags:
Expand Down Expand Up @@ -522,19 +522,19 @@ definitions:
properties:
name:
type: "string"
description: "The name of the host credential"
description: "The name of the credential"
username:
type: "string"
description: "The connection username for the host credential"
description: "The connection username for the credential"
password:
type: "string"
description: "The connection password for the host credential"
description: "The connection password for the credential"
ssh_keyfile:
type: "string"
description: "The connection private ssh keyfile for the host credential"
description: "The connection private ssh keyfile for the credential"
sudo_password:
type: "string"
description: "The password for sudo permission escalation after connection for the host credential"
description: "The password for sudo permission escalation after connection for the credential"
CredentialMin:
type: "object"
required:
Expand All @@ -546,7 +546,7 @@ definitions:
format: "int64"
name:
type: "string"
description: "The name of the host credential"
description: "The name of the credential"
CredentialOut:
allOf:
- $ref: "#/definitions/Credential"
Expand Down Expand Up @@ -623,7 +623,7 @@ definitions:
items:
type: "integer"
format: "int64"
description: "The host credentials to try with these hosts."
description: "The credentials to try with these hosts."
NetworkProfileOut:
allOf:
- $ref: "#/definitions/NetworkProfile"
Expand All @@ -639,7 +639,7 @@ definitions:
type: "array"
items:
$ref: "#/definitions/CredentialMin"
description: "The host credentials to try with these hosts."
description: "The credentials to try with these hosts."
ScanJob:
type: "object"
properties:
Expand Down Expand Up @@ -670,6 +670,10 @@ definitions:
type: "integer"
format: "int64"
description: "The total number of hosts that have been scanned."
failed_scans:
type: "integer"
format: "int64"
description: "The total number of hosts that failed to scan."
fact_collection_id:
type: "integer"
format: "int64"
Expand Down

0 comments on commit 64a9200

Please sign in to comment.