kafka-ui/kafka-ui-react-app/src/components/Schemas/Diff/__test__/fixtures.ts
Si Tang dd42dbe0cd
#867: add a view for comparing schema versions (#1044)
* #867: add a view for comparing schema versions

* fixing test for diff component

* adding color to lines which are different in versions

* adding function to determine schema type and display correct format when comparing versions

* removing unneccessary style

* changing fetch approach and fixing test issue

* fixinf schema versions comparision path change approach

* remove unnecessary code

* removing enzyme,removing direct use of Colors and adding dispatch to array of deps

* added requested changes

* makeing requested changes

Co-authored-by: NelyDavtyan <ndavtyan@provectus.com>
Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
Co-authored-by: NelyDavtyan <96067981+NelyDavtyan@users.noreply.github.com>
2022-02-21 17:12:27 +04:00

31 lines
873 B
TypeScript

import { SchemaSubject, SchemaType } from 'generated-sources';
export const versions: SchemaSubject[] = [
{
subject: 'test',
version: '3',
id: 3,
schema:
'syntax = "proto3";\npackage com.indeed;\n\nmessage MyRecord {\n int32 id = 1;\n string name = 2;\n}\n',
compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.PROTOBUF,
},
{
subject: 'test',
version: '2',
id: 2,
schema:
'{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
},
{
subject: 'test',
version: '1',
id: 1,
schema:
'{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
},
];