feat: add hourly portfolio sync history
This commit is contained in:
@@ -27,32 +27,8 @@ describe('OpenAPI contract (integration)', () => {
|
||||
it('distinguishes calendar screen dates from operation instants in requests and responses', () => {
|
||||
const document = createOpenApiDocument(app);
|
||||
const schemas = document.components?.schemas;
|
||||
const screenSchema = {
|
||||
oneOf: [
|
||||
{ $ref: '#/components/schemas/IncomeInvestmentScreenDto' },
|
||||
{ $ref: '#/components/schemas/EventsInvestmentScreenDto' },
|
||||
{ $ref: '#/components/schemas/TimestampInvestmentScreenDto' },
|
||||
],
|
||||
discriminator: {
|
||||
propertyName: 'screen',
|
||||
mapping: {
|
||||
income: '#/components/schemas/IncomeInvestmentScreenDto',
|
||||
events: '#/components/schemas/EventsInvestmentScreenDto',
|
||||
operations: '#/components/schemas/TimestampInvestmentScreenDto',
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(
|
||||
document.paths['/api/v1/tbank-sync'].post?.requestBody,
|
||||
).toMatchObject({
|
||||
content: { 'application/json': { schema: screenSchema } },
|
||||
});
|
||||
expect(schemas?.TbankSyncAcceptedDto).toMatchObject({
|
||||
properties: { scope: screenSchema },
|
||||
});
|
||||
expect(schemas?.TbankSyncStatusDto).toMatchObject({
|
||||
properties: { scope: { ...screenSchema, nullable: true } },
|
||||
});
|
||||
expect(document.paths['/api/v1/tbank-sync']).toBeUndefined();
|
||||
expect(schemas?.TbankSyncStatusDto).toBeDefined();
|
||||
for (const [model, screen] of [
|
||||
['IncomeInvestmentScreenDto', 'income'],
|
||||
['EventsInvestmentScreenDto', 'events'],
|
||||
|
||||
Reference in New Issue
Block a user