-
Notifications
You must be signed in to change notification settings - Fork 6
feat: use new config model #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
27da011
fix: allow only uuidv4 ids
alinarublea 427c677
fix: allow only uuidv4 ids
alinarublea c1b64d0
fix: allow only uuidv4 ids
alinarublea b91591d
fix: allow default organization
alinarublea 4516d9c
Merge branch 'main' into security-issue
alinarublea e25308b
Merge branch 'main' into security-issue
alinarublea 5731d5c
Merge branch 'security-issue' of github.com:adobe/spacecat-api-service
alinarublea 81d164d
Merge branch 'main' of github.com:adobe/spacecat-api-service
alinarublea 3ec3e13
feat: use new config model
alinarublea 4354ce4
feat: use new config model
alinarublea a98274d
fix: update main
alinarublea 4e38af8
fix: unit tests
alinarublea cf93a85
fix: unit tests
alinarublea 7d582af
fix: add API docs
alinarublea c8ac6cb
Merge branch 'main' into issue-115-2
alinarublea a4b79a5
fix: add API docs
alinarublea a3d09a5
Merge branch 'issue-115-2' of github.com:adobe/spacecat-api-service i…
alinarublea e6096f5
fix: add API docs
alinarublea f35bb75
fix: add API docs
alinarublea d29011f
fix: add API docs
alinarublea cbe9a3c
fix: add API docs
alinarublea 6fd9409
fix: add API docs
alinarublea e5ad9c2
fix: add API docs
alinarublea 9388956
fix: add API docs
alinarublea 6046132
fix: add API docs
alinarublea 9a80584
fix: add API docs
alinarublea da3ccb0
fix: add API docs
alinarublea 6006de7
Merge branch 'main' into issue-115-2
alinarublea 3e8186e
fix: add API docs
alinarublea 2f15d0b
Merge branch 'issue-115-2' of github.com:adobe/spacecat-api-service i…
alinarublea c0b0c6e
fix: add API docs
alinarublea d4cce98
fix: add API docs
alinarublea ff73579
Merge branch 'main' of github.com:adobe/spacecat-api-service into iss…
alinarublea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,32 +45,31 @@ EmailAddress: | |
format: email | ||
example: '[email protected]' | ||
SlackMentionConfig: | ||
type: object | ||
properties: | ||
slack: | ||
type: array | ||
items: | ||
type: string | ||
HandlerConfig: | ||
type: object | ||
additionalProperties: true | ||
properties: | ||
slack: | ||
type: array | ||
items: | ||
type: string | ||
AlertConfig: | ||
type: object | ||
additionalProperties: true | ||
additionalProperties: false | ||
properties: | ||
type: | ||
description: The type of the alert | ||
type: string | ||
byOrg: | ||
description: Whether the alert should be sent by organization | ||
type: boolean | ||
mentions: | ||
description: The Slack mentions to include in the alert | ||
$ref: '#/SlackMentionConfig' | ||
excludedURLs: | ||
description: URLs to be excluded from the handler's processing | ||
type: array | ||
items: | ||
$ref: '#/SlackMentionConfig' | ||
AlertsConfig: | ||
type: array | ||
items: | ||
$ref: '#/AlertConfig' | ||
type: string | ||
format: uri | ||
patternProperties: | ||
"^(404|broken-backlinks)$": | ||
type: object | ||
properties: | ||
mentions: | ||
$ref: '#/SlackMentionConfig' | ||
# Define other properties specific to the alert type here | ||
SlackConfig: | ||
type: object | ||
additionalProperties: true | ||
|
@@ -98,9 +97,9 @@ Config: | |
slack: | ||
description: Optional. The Slack configuration | ||
$ref: '#/SlackConfig' | ||
alerts: | ||
handlers: | ||
description: Optional. The Alert configuration | ||
$ref: '#/AlertsConfig' | ||
$ref: '#/HandlerConfig' | ||
OrganizationConfig: | ||
allOf: | ||
- $ref: '#/Config' | ||
|
@@ -137,17 +136,17 @@ Organization: | |
channel: '#example-channel' | ||
workspace: 'example-workspace' | ||
invitedUserCount: 5 | ||
alerts: | ||
- type: '404' | ||
handlers: | ||
'404': | ||
byOrg: true | ||
mentions: | ||
- slack: | ||
slack: | ||
- '@user1' | ||
- '@user2' | ||
- type: 'cwv' | ||
'cwv': | ||
byOrg: false | ||
mentions: | ||
- slack: | ||
slack: | ||
- '@user5' | ||
- '@user6' | ||
createdAt: '2023-12-15T09:30:00Z' | ||
|
@@ -177,17 +176,16 @@ OrganizationCreate: | |
slack: | ||
channel: '#example-channel' | ||
workspace: 'example-workspace' | ||
alerts: | ||
- type: '404' | ||
byOrg: true | ||
handlers: | ||
'404': | ||
mentions: | ||
- slack: | ||
slack: | ||
- '@user3' | ||
- '@user4' | ||
- type: 'cwv' | ||
'cwv': | ||
byOrg: false | ||
mentions: | ||
- slack: | ||
slack: | ||
- '@user5' | ||
- '@user6' | ||
OrganizationUpdate: | ||
|
@@ -209,19 +207,17 @@ OrganizationUpdate: | |
slack: | ||
channel: '#example-channel' | ||
workspace: 'example-workspace' | ||
alerts: | ||
- type: '404' | ||
byOrg: true | ||
mentions: | ||
- slack: | ||
- '@user1' | ||
- '@user2' | ||
- type: 'cwv' | ||
byOrg: false | ||
mentions: | ||
- slack: | ||
- '@user5' | ||
- '@user6' | ||
handlers: | ||
'404': | ||
mentions: | ||
slack: | ||
- '@user3' | ||
- '@user4' | ||
'cwv': | ||
mentions: | ||
slack: | ||
- '@user5' | ||
- '@user6' | ||
Site: | ||
type: object | ||
properties: | ||
|
@@ -244,9 +240,6 @@ Site: | |
description: The date and time when the site went live on AEM Edge | ||
nullable: true | ||
$ref: '#/DateTime' | ||
auditConfig: | ||
description: The audit configuration for this site | ||
$ref: '#/AuditConfig' | ||
config: | ||
description: Optional. The configuration of the site. May override the organization configuration. | ||
$ref: '#/SiteConfig' | ||
|
@@ -263,30 +256,27 @@ Site: | |
deliveryType: 'aem_edge' | ||
gitHubURL: 'https://github.com/example/repo' | ||
goLiveDate: '2024-01-20T10:00:00Z' | ||
auditConfig: | ||
auditsDisabled: false | ||
auditTypeConfigs: | ||
'404': | ||
disabled: true | ||
'cwv': | ||
disabled: false | ||
config: | ||
slack: | ||
channel: 'C1234567890' | ||
workspace: 'example-workspace' | ||
alerts: | ||
- type: '404' | ||
byOrg: true | ||
handlers: | ||
'404': | ||
mentions: | ||
- slack: | ||
slack: | ||
- '@user1' | ||
- '@user2' | ||
- type: 'cwv' | ||
byOrg: false | ||
'broken-backlinks': | ||
mentions: | ||
- slack: | ||
slack: | ||
- '@user5' | ||
- '@user6' | ||
excludedURLs: | ||
description: URLs to be excluded from the alert | ||
type: array | ||
items: | ||
type: string | ||
format: uri' | ||
createdAt: '2023-12-15T09:30:00Z' | ||
updatedAt: '2024-01-19T11:20:00Z' | ||
SiteWithLatestAudit: | ||
|
@@ -306,13 +296,6 @@ SiteWithLatestAudit: | |
deliveryType: 'aem_edge' | ||
gitHubURL: 'https://github.com/example/repo' | ||
goLiveDate: '2024-01-20T10:00:00Z' | ||
auditConfig: | ||
auditsDisabled: false | ||
auditTypeConfigs: | ||
'404': | ||
disabled: true | ||
'cwv': | ||
disabled: false | ||
createdAt: '2023-12-15T09:30:00Z' | ||
updatedAt: '2024-01-19T11:20:00Z' | ||
audits: | ||
|
@@ -358,9 +341,6 @@ SiteCreate: | |
description: The date and time when the site went live on AEM Edge | ||
nullable: true | ||
$ref: '#/DateTime' | ||
auditConfig: | ||
description: The audit configuration for this site | ||
$ref: '#/AuditConfig' | ||
example: | ||
organizationId: 'o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z' | ||
baseURL: 'https://www.newsite.com' | ||
|
@@ -378,33 +358,14 @@ SiteUpdate: | |
description: The date and time when the site went live on AEM Edge | ||
nullable: true | ||
$ref: '#/DateTime' | ||
auditConfig: | ||
description: The audit configuration for this site | ||
$ref: '#/AuditConfig' | ||
config: | ||
description: Optional. The configuration of the site | ||
$ref: '#/SiteConfig' | ||
example: | ||
organizationId: 'u7y6t5r4-e3w2-x1z0-z9y8-x7v6w5u4t3s2' | ||
deliveryType: 'other' | ||
goLiveDate: '2024-01-20T10:00:00Z' | ||
AuditConfigType: | ||
type: object | ||
properties: | ||
disabled: | ||
description: Whether audits are disabled for the given audit type | ||
type: boolean | ||
excludedURLs: | ||
description: (Optional) Set of urls to exclude. If empty, will remove previously excluded URLs. It's an array of strings | ||
type: array | ||
items: | ||
type: string | ||
example: | ||
disabled: true | ||
excludedURLs: | ||
- 'https://www.adobe.com/some-page' | ||
- 'https://www.adobe.com/another-page' | ||
UpdateAuditConfigType: | ||
UpdateHandlerTypeConfig: | ||
type: object | ||
properties: | ||
excludedURLs: | ||
|
@@ -416,23 +377,6 @@ UpdateAuditConfigType: | |
excludedURLs: | ||
- 'https://www.adobe.com/some-page' | ||
- 'https://www.adobe.com/another-page' | ||
AuditConfig: | ||
type: object | ||
properties: | ||
auditsDisabled: | ||
description: Whether audits are disabled for this site | ||
type: boolean | ||
auditTypeConfigs: | ||
type: object | ||
additionalProperties: | ||
$ref: '#/AuditConfigType' | ||
example: | ||
auditsDisabled: false | ||
auditTypeConfigs: | ||
'404': | ||
disabled: true | ||
'cwv': | ||
disabled: false | ||
Audit: | ||
type: object | ||
readOnly: true | ||
|
@@ -446,10 +390,6 @@ Audit: | |
expiresAt: | ||
description: The date and time when the audit expires in ISO 8601 format | ||
$ref: '#/DateTime' | ||
auditType: | ||
description: The type of the audit | ||
$ref: '#/AuditType' | ||
isError: | ||
type: boolean | ||
deliveryType: | ||
description: The type of the delivery this site is using | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can start reusing examples, when they become repetitive: https://swagger.io/docs/specification/adding-examples/ -> Reusing Examples