-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new project overview backend (#5344)
Adding new project overview endpoint and deprecating the old one. The new one has extra info about feature types, but does not have features anymore, because features are coming from search endpoint.
- Loading branch information
Showing
21 changed files
with
532 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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
18 changes: 18 additions & 0 deletions
18
src/lib/openapi/spec/__snapshots__/deprecated-project-overview-schema.test.ts.snap
This file contains 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`deprecatedProjectOverviewSchema 1`] = ` | ||
{ | ||
"errors": [ | ||
{ | ||
"instancePath": "", | ||
"keyword": "required", | ||
"message": "must have required property 'version'", | ||
"params": { | ||
"missingProperty": "version", | ||
}, | ||
"schemaPath": "#/required", | ||
}, | ||
], | ||
"schema": "#/components/schemas/deprecatedProjectOverviewSchema", | ||
} | ||
`; |
18 changes: 18 additions & 0 deletions
18
src/lib/openapi/spec/__snapshots__/feature-type-count-schema.test.ts.snap
This file contains 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`featureTypeCountSchema 1`] = ` | ||
{ | ||
"errors": [ | ||
{ | ||
"instancePath": "", | ||
"keyword": "required", | ||
"message": "must have required property 'type'", | ||
"params": { | ||
"missingProperty": "type", | ||
}, | ||
"schemaPath": "#/required", | ||
}, | ||
], | ||
"schema": "#/components/schemas/featureTypeCountSchema", | ||
} | ||
`; |
2 changes: 1 addition & 1 deletion
2
src/lib/openapi/spec/__snapshots__/project-overview-schema.test.ts.snap
This file contains 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
28 changes: 28 additions & 0 deletions
28
src/lib/openapi/spec/deprecated-project-overview-schema.test.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { DeprecatedProjectOverviewSchema } from './deprecated-project-overview-schema'; | ||
import { validateSchema } from '../validate'; | ||
|
||
test('deprecatedProjectOverviewSchema', () => { | ||
const data: DeprecatedProjectOverviewSchema = { | ||
name: 'project', | ||
version: 3, | ||
featureNaming: { | ||
description: 'naming description', | ||
example: 'a', | ||
pattern: '[aZ]', | ||
}, | ||
}; | ||
|
||
expect( | ||
validateSchema( | ||
'#/components/schemas/deprecatedProjectOverviewSchema', | ||
data, | ||
), | ||
).toBeUndefined(); | ||
|
||
expect( | ||
validateSchema( | ||
'#/components/schemas/deprecatedProjectOverviewSchema', | ||
{}, | ||
), | ||
).toMatchSnapshot(); | ||
}); |
Oops, something went wrong.