Skip to content

Commit

Permalink
scans odata (openclarity#128)
Browse files Browse the repository at this point in the history
Adjust Scans APIs for odata DB computability
  • Loading branch information
fishkerez authored Mar 13, 2023
1 parent 5a2e0ca commit 0e456e0
Show file tree
Hide file tree
Showing 17 changed files with 754 additions and 1,208 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ bin/
/cloud-config.cfg
db.db
ui/build/
site/
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ issues:
- path: _test\.go
linters:
- govet
- path: backend/pkg/database/demo.go
linters:
- gomnd
74 changes: 63 additions & 11 deletions api/client/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 11 additions & 14 deletions api/models/models.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 7 additions & 24 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,13 @@ paths:

/scans:
get:
summary: Get all scans. Each scan contaians details about a multi-target scheduled scan.
summary: Get all scans. Each scan contains details about a multi-target scheduled scan.
parameters:
- $ref: '#/components/parameters/odataFilter'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/odataSelect'
- $ref: '#/components/parameters/odataCount'
- $ref: '#/components/parameters/odataTop'
- $ref: '#/components/parameters/odataSkip'
responses:
200:
description: Success
Expand Down Expand Up @@ -280,6 +282,7 @@ paths:
summary: Get the details for a given multi-target scheduled scan.
parameters:
- $ref: '#/components/parameters/scanID'
- $ref: '#/components/parameters/odataSelect'
responses:
200:
description: Success
Expand Down Expand Up @@ -692,7 +695,7 @@ components:
Scans:
type: object
properties:
total:
count:
type: integer
description: Total scans count according to the given filters
readOnly: true
Expand All @@ -703,8 +706,6 @@ components:
items:
$ref: '#/components/schemas/Scan'
readOnly: true
required:
- total

ScanData:
type: object
Expand Down Expand Up @@ -1830,21 +1831,3 @@ components:
required: true
schema:
type: string

page:
name: page
in: query
description: Page number of the query
required: false
schema:
type: integer

pageSize:
name: pageSize
in: query
description: Maximum items to return
required: false
schema:
maximum: 50
minimum: 1
type: integer
Loading

0 comments on commit 0e456e0

Please sign in to comment.