Skip to content

Commit

Permalink
Merge pull request #70 from anchore/svietry/repo
Browse files Browse the repository at this point in the history
chore: update to new swagger for repo watcher feature
  • Loading branch information
svietry authored Jul 31, 2024
2 parents 38f25b2 + 6bb6012 commit bcd389b
Show file tree
Hide file tree
Showing 384 changed files with 540 additions and 417 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OPENAPI_GENERATOR_VERSION = v6.0.0

# --- anchore enterprise references
# a git tag/branch/commit within anchore/enterprise repo
ENTERPRISE_REF = v5.7.0-rc0
ENTERPRISE_REF = 5f8d8d323cee1e1442259e3b69a2f4e2761739ab
ENTERPRISE_ROOT = $(PROJECT_ROOT)/enterprise
ENTERPRISE_OPENAPI_DOC = $(PROJECT_ROOT)/anchore-api-swagger-$(ENTERPRISE_REF).yaml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 2.6.0
version: 2.6.1
servers:
- url: /v2
tags:
Expand Down Expand Up @@ -3376,6 +3376,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/AnchoreImage'
404:
description: Image not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
500:
description: Internal error
content:
Expand Down Expand Up @@ -3414,6 +3420,24 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/DeleteImageResponse'
400:
description: Bad Delete request given image's current state
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
404:
description: Image not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
500:
description: Internal error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
x-openapi-router-controller: anchore_enterprise.services.api.api.controllers.images
x-anchore-authz-action: deleteImage
/imports/images:
Expand Down Expand Up @@ -7626,20 +7650,27 @@ paths:
parameters:
- name: repository
in: query
description: full repository to add e.g. docker.io/library/alpine
description: Full repository to add e.g. docker.io/library/alpine
required: true
schema:
type: string
- name: auto_subscribe
in: query
description: flag to enable/disable auto tag_update activation when new images
from a repo are added
description: Flag to enable/disable auto tag_update activation when new images
from a repo are added. Default is false.
schema:
type: boolean
- name: dry_run
in: query
description: flag to return tags in the repository without actually watching
the repository, default is false
description: Flag to return tags in the repository without actually watching
the repository. Default is false.
schema:
type: boolean
- name: exclude_existing_tags
in: query
description: Flag that indicates if the watcher will exclude existing tags
from the repository during the first run. When set to 'true', the watcher will only add
newly detected tags to the system from this time forward. Default is false.
schema:
type: boolean
- name: x-anchore-account
Expand Down Expand Up @@ -8350,7 +8381,7 @@ paths:
- active
- deleting
default:
- active
- active
- name: registry
in: query
description: Filter by registry
Expand Down Expand Up @@ -8880,7 +8911,7 @@ paths:
tags:
- Statistics
summary: List System Statistics
description: Returns list of system statistics
description: Returns list of system statistics with total all-time counts.
operationId: get_system_statistics
responses:
200:
Expand Down Expand Up @@ -9630,7 +9661,7 @@ components:
type: object
properties:
name:
pattern: ^[a-zA-Z0-9][ a-zA-Z0-9@.!#$+=^_`~;-]{1,126}[a-zA-Z0-9_]$
pattern: ^[a-zA-Z0-9][ a-zA-Z0-9@.!$+=^_`~;-]{1,126}[a-zA-Z0-9_]$
type: string
description: The account name to use. This will identify the account and
must be globally unique in the system.
Expand Down Expand Up @@ -15258,9 +15289,11 @@ components:
type: object
properties:
username:
pattern: ^[a-zA-Z0-9][ a-zA-Z0-9@.!#$+=^_`~;-]{1,126}[a-zA-Z0-9_]$
pattern: ^[a-zA-Z0-9][ a-zA-Z0-9@.!#$+=^_`~;:-]{1,126}[a-zA-Z0-9_]$
type: string
description: The username to create
description: The username for authentication. If the user_type is 'native',
this name must not contain a colon character as per RFC 2617 (HTTP Basic and Digest Authentication). If the user_type is 'saml', then colons are allowed
in the name since HTTP Basic auth is not used for that user type.
password:
pattern: .{6,128}$
type: string
Expand Down
2 changes: 1 addition & 1 deletion pkg/enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is the Anchore API. Provides the external API for users of Anchore Enterpri
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 2.6.0
- API version: 2.6.1
- Package version: 5.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen

Expand Down
59 changes: 49 additions & 10 deletions pkg/enterprise/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
title: Anchore API
version: 2.6.0
version: 2.6.1
servers:
- url: /v2
tags:
Expand Down Expand Up @@ -3876,6 +3876,24 @@ paths:
schema:
$ref: '#/components/schemas/DeleteImageResponse'
description: Image deletion success
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
description: Bad Delete request given image's current state
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
description: Image not found
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
description: Internal error
summary: Delete an image analysis
tags:
- Images
Expand Down Expand Up @@ -3909,6 +3927,12 @@ paths:
schema:
$ref: '#/components/schemas/AnchoreImage'
description: Image lookup success
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorResponse'
description: Image not found
"500":
content:
application/json:
Expand Down Expand Up @@ -8486,32 +8510,43 @@ paths:
post:
operationId: add_repository
parameters:
- description: full repository to add e.g. docker.io/library/alpine
- description: Full repository to add e.g. docker.io/library/alpine
explode: true
in: query
name: repository
required: true
schema:
type: string
style: form
- description: flag to enable/disable auto tag_update activation when new images
from a repo are added
- description: Flag to enable/disable auto tag_update activation when new images
from a repo are added. Default is false.
explode: true
in: query
name: auto_subscribe
required: false
schema:
type: boolean
style: form
- description: "flag to return tags in the repository without actually watching\
\ the repository, default is false"
- description: Flag to return tags in the repository without actually watching
the repository. Default is false.
explode: true
in: query
name: dry_run
required: false
schema:
type: boolean
style: form
- description: "Flag that indicates if the watcher will exclude existing tags\
\ from the repository during the first run. When set to 'true', the watcher\
\ will only add newly detected tags to the system from this time forward.\
\ Default is false."
explode: true
in: query
name: exclude_existing_tags
required: false
schema:
type: boolean
style: form
- description: "An account name to change the resource scope of the request\
\ to that account, if permissions allow (admin only)"
explode: false
Expand Down Expand Up @@ -9894,7 +9929,7 @@ paths:
x-anchore-authz-action: getService
/system/statistics:
get:
description: Returns list of system statistics
description: Returns list of system statistics with total all-time counts.
operationId: get_system_statistics
responses:
"200":
Expand Down Expand Up @@ -10721,7 +10756,7 @@ components:
name:
description: The account name to use. This will identify the account and
must be globally unique in the system.
pattern: "^[a-zA-Z0-9][ a-zA-Z0-9@.!#$+=^_`~;-]{1,126}[a-zA-Z0-9_]$"
pattern: "^[a-zA-Z0-9][ a-zA-Z0-9@.!$+=^_`~;-]{1,126}[a-zA-Z0-9_]$"
type: string
email:
description: An optional email to associate with the account for contact
Expand Down Expand Up @@ -20334,8 +20369,12 @@ components:
username: username
properties:
username:
description: The username to create
pattern: "^[a-zA-Z0-9][ a-zA-Z0-9@.!#$+=^_`~;-]{1,126}[a-zA-Z0-9_]$"
description: "The username for authentication. If the user_type is 'native',\
\ this name must not contain a colon character as per RFC 2617 (HTTP Basic\
\ and Digest Authentication). If the user_type is 'saml', then colons\
\ are allowed in the name since HTTP Basic auth is not used for that user\
\ type."
pattern: "^[a-zA-Z0-9][ a-zA-Z0-9@.!#$+=^_`~;:-]{1,126}[a-zA-Z0-9_]$"
type: string
password:
description: "The initial password for the user, must be at least 6 characters,\
Expand Down
2 changes: 1 addition & 1 deletion pkg/enterprise/api_actions.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_alerts.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_applications.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_archives.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_artifact_lifecycle.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_catalog.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_corrections.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_events.go

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

2 changes: 1 addition & 1 deletion pkg/enterprise/api_identity.go

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

Loading

0 comments on commit bcd389b

Please sign in to comment.