Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 175 additions & 3 deletions openapi-specs/component-catalog-v1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,56 @@ tags:
- name: ProvisionerActions
description: Provisioning notifications from AWX/Provisioner
paths:
/project/components:
get:
operationId: getAllProjectComponents
parameters:
- name: page
in: query
description: Page number (from 0 until limit)
required: false
schema:
type: integer
default: 0

- name: size
in: query
description: Page size
required: false
schema:
type: integer
default: 20
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ProjectComponentsMetrics"
description: A paginated list of all the provisioned project components
"401":
content:
application/json:
schema:
$ref: "#/components/schemas/RestErrorMessage"
description: Invalid client token on the request.
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/RestErrorMessage"
description: Insufficient permissions for the client to access the resource.
"500":
content:
application/json:
schema:
$ref: "#/components/schemas/RestErrorMessage"
description: Server error.
summary: Returns the information of the project's components in the Bitbucket
repository.
tags:
- Project-components
x-accepts:
- application/json
/project/{projectKey}/components:
get:
tags:
Expand Down Expand Up @@ -279,7 +329,7 @@ paths:
- name: catalogId
in: query
description: id for the Catalog.
required: true
required: false
schema:
type: string
- name: sortByTitle
Expand Down Expand Up @@ -996,6 +1046,20 @@ components:
type: string
format: date-time
example: '2021-07-01T00:00:00Z'
updatedAt:
type: integer
format: int64
example: 1625097600000
description: Timestamp in milliseconds since Unix epoch
componentCount:
type: integer
example: 5
description: Number of project components provisioned from this catalog item
x-field-extra-annotation: |
@com.fasterxml.jackson.annotation.JsonInclude(
com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL
)

userActions:
type: array
items:
Expand All @@ -1006,10 +1070,10 @@ components:
- id
- title
- shortDescription
- description
- image
- itemSrc
- authors
- date
- updatedAt
example:
id: aSdFam...yCg==
slug: myproject_some-repo
Expand Down Expand Up @@ -1350,3 +1414,111 @@ components:
example:
- "production"
- "staging"

ProjectComponentMetrics:
type: object
example:
projectKey: SOMEPROJECT
componentId: any-component-id-from-backend
caller: some-person@example.com
catalogItemSlug: some_technology-name
createdAt: 1707043200000
updatedAt: 1707043200000
properties:
projectKey:
description: The projectKey which the component is provisioned for.
example: SOMEPROJECT
type: string
componentId:
description: The componentId set by the user.
example: any-component-id-from-backend
minLength: 1
pattern: ^(?!\s*$).+
type: string
caller:
description: The email of who provisioned the component.
example: some-person@example.com
type: string
catalogItemSlug:
description: The provisioned catalog item slug.
example: some_technology-name
type: string
createdAt:
description: The timestamp of the provision action.
example: 1707043200000
type: number
updatedAt:
description: The timestamp of the last change of the provisioned component.
example: 1707043200000
type: number

Pagination:
type: object
example:
page: 0
size: 20
totalElements: 117
totalPages: 6
next: "https://api.example.com/resources?page=1&size=20"
previous: null
properties:
page:
type: integer
example: 0
description: Current page of the response.
size:
type: integer
example: 20
description: Current page size of the response.
totalElements:
type: integer
format: integer
example: 117
description: Total number of elements.
totalPages:
type: integer
example: 6
description: Total number of pages of this exact size.
next:
type: string
format: uri
nullable: true
example: "https://api.example.com/resources?page=1&size=20"
description: URL of the next page (or null if the current is the last one)
previous:
type: string
format: uri
nullable: true
example: "https://api.example.com/resources?page=0&size=20"
description: URL of the previous page (or null if the current is the first one)

ProjectComponentsMetrics:
type: object
example:
data:
- projectKey: SOMEPROJECT
componentId: any-component-id-from-backend
caller: some-person@example.com
catalogItemSlug: some_technology-name
createdAt: 1707043200000
updatedAt: 1707043200000
- projectKey: ANOTHERPROJECT
componentId: another-component-id-from-backend
caller: some-person2@example.com
catalogItemSlug: another_technology-name
createdAt: 1707043200001
updatedAt: 1707043200002
pagination:
page: 0
size: 20
totalElements: 117
totalPages: 6
next: https://api.example.com/resources?page=1&size=20
previous: null
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectComponentMetrics'
pagination:
$ref: '#/components/schemas/Pagination'
160 changes: 158 additions & 2 deletions openapi-specs/component-provisioner-v1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ info:
url: https://confluence.biscrum.com/pages/viewpage.action?spaceKey=EDP&title=Welcome
servers:
- url: http://{baseurl}/v1
variables:
variables:
baseurl:
default: localhost:8080
description: Default address for a Component Provisioner's backend REST API instance.
Expand Down Expand Up @@ -336,6 +336,57 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/RestErrorMessage'

/project/components:
get:
operationId: getAllProjectComponents
parameters:
- name: page
in: query
description: Page number (from 0 until limit)
required: false
schema:
type: integer
default: 0

- name: size
in: query
description: Page size
required: false
schema:
type: integer
default: 20
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ProjectComponentsMetrics"
description: A paginated list of all the provisioned project components
"401":
content:
application/json:
schema:
$ref: "#/components/schemas/RestErrorMessage"
description: Invalid client token on the request.
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/RestErrorMessage"
description: Insufficient permissions for the client to access the resource.
"500":
content:
application/json:
schema:
$ref: "#/components/schemas/RestErrorMessage"
description: Server error.
summary: Returns the information of the project's components in the Bitbucket
repository.
tags:
- Project-components-with-provision-status
x-accepts:
- application/json
components:
securitySchemes:
bearerAuth:
Expand Down Expand Up @@ -582,4 +633,109 @@ components:
parameters:
type: array
items:
$ref: '#/components/schemas/ProjectComponentStatusParameter'
$ref: '#/components/schemas/ProjectComponentStatusParameter'
ProjectComponentMetrics:
type: object
example:
projectKey: SOMEPROJECT
componentId: any-component-id-from-backend
caller: some-person@email.com
catalogItemSlug: some_technology-name
createdAt: 1707043200000
updatedAt: 1707043200000
properties:
projectKey:
description: The projectKey which the component is provisioned for.
example: SOMEPROJECT
type: string
componentId:
description: The componentId set by the user.
example: any-component-id-from-backend
minLength: 1
pattern: ^(?!\s*$).+
type: string
caller:
description: The email of who provisioned the component.
example: some-person@email.com
type: string
catalogItemSlug:
description: The provisioned catalog item slug.
example: some_technology-name
type: string
createdAt:
description: The timestamp of the provision action.
example: 1707043200000
type: number
updatedAt:
description: The timestamp of the last change of the provisioned component.
example: 1707043200000
type: number
Pagination:
type: object
example:
page: 0
size: 20
totalElements: 117
totalPages: 6
next: "https://api.example.com/resources?page=1&size=20"
previous: null
properties:
page:
type: integer
example: 0
description: Current page of the response.
size:
type: integer
example: 20
description: Current page size of the response.
totalElements:
type: integer
format: integer
example: 117
description: Total number of elements.
totalPages:
type: integer
example: 6
description: Total number of pages of this exact size.
next:
type: string
format: uri
nullable: true
example: "https://api.example.com/resources?page=1&size=20"
description: URL of the next page (or null if the current is the last one)
previous:
type: string
format: uri
nullable: true
example: "https://api.example.com/resources?page=0&size=20"
description: URL of the previous page (or null if the current is the first one)
ProjectComponentsMetrics:
type: object
example:
data:
- projectKey: SOMEPROJECT
componentId: any-component-id-from-backend
caller: some-person@email.com
catalogItemSlug: some_technology-name
createdAt: 1707043200000
updatedAt: 1707043200000
- projectKey: ANOTHERPROJECT
componentId: another-component-id-from-backend
caller: some-person2@email.com
catalogItemSlug: another_technology-name
createdAt: 1707043200001
updatedAt: 1707043200002
pagination:
page: 0
size: 20
totalElements: 117
totalPages: 6
next: https://api.example.com/resources?page=1&size=20
previous: null
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectComponentMetrics'
pagination:
$ref: '#/components/schemas/Pagination'
1 change: 1 addition & 0 deletions src/app/models/app-product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import { ProductAction } from "./product-action";

export interface AppProduct extends AppShellProduct {
actions?: Array<ProductAction>;
componentCount? : number
}
Loading
Loading