[ISSUE-200] Update FE to support new version of api

This commit is contained in:
Oleg Shuralev 2021-03-05 17:09:17 +03:00
parent 7f15bf1c0b
commit b417603eca
No known key found for this signature in database
GPG key ID: 99C6BDC0A1C2E647
10 changed files with 54 additions and 27 deletions

View file

@ -75,6 +75,7 @@ exports[`Details View Initial state matches snapshot 1`] = `
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
} }
@ -181,6 +182,7 @@ exports[`Details View when page with schema versions is loading matches snapshot
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
} }
@ -266,6 +268,7 @@ exports[`Details View when page with schema versions loaded when schema has vers
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
} }
@ -299,6 +302,7 @@ exports[`Details View when page with schema versions loaded when schema has vers
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
} }
@ -311,6 +315,7 @@ exports[`Details View when page with schema versions loaded when schema has vers
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 2, "id": 2,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord2\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord2\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "2", "version": "2",
} }
@ -397,6 +402,7 @@ exports[`Details View when page with schema versions loaded when versions are em
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
} }

View file

@ -1,4 +1,4 @@
import { SchemaSubject } from 'generated-sources'; import { SchemaSubject, SchemaType } from 'generated-sources';
export const schema: SchemaSubject = { export const schema: SchemaSubject = {
subject: 'test', subject: 'test',
@ -7,6 +7,7 @@ export const schema: SchemaSubject = {
schema: schema:
'{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}; };
export const versions: SchemaSubject[] = [ export const versions: SchemaSubject[] = [
@ -17,6 +18,7 @@ export const versions: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test', subject: 'test',
@ -25,5 +27,6 @@ export const versions: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
]; ];

View file

@ -32,6 +32,7 @@ exports[`ListItem matches snapshot 1`] = `
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
} }

View file

@ -1,4 +1,4 @@
import { SchemaSubject } from 'generated-sources'; import { SchemaSubject, SchemaType } from 'generated-sources';
export const schemas: SchemaSubject[] = [ export const schemas: SchemaSubject[] = [
{ {
@ -8,6 +8,7 @@ export const schemas: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test2', subject: 'test2',
@ -16,6 +17,7 @@ export const schemas: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test3', subject: 'test3',
@ -24,5 +26,6 @@ export const schemas: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord3","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord3","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
]; ];

View file

@ -1,17 +1,16 @@
import React from 'react'; import React from 'react';
import { ClusterName, SchemaName, NewSchemaSubjectRaw } from 'redux/interfaces'; import { ClusterName, NewSchemaSubjectRaw } from 'redux/interfaces';
import { useForm } from 'react-hook-form'; import { useForm } from 'react-hook-form';
import { ErrorMessage } from '@hookform/error-message'; import { ErrorMessage } from '@hookform/error-message';
import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb';
import { clusterSchemaPath, clusterSchemasPath } from 'lib/paths'; import { clusterSchemaPath, clusterSchemasPath } from 'lib/paths';
import { NewSchemaSubject } from 'generated-sources'; import { NewSchemaSubject, SchemaType } from 'generated-sources';
import { SCHEMA_NAME_VALIDATION_PATTERN } from 'lib/constants'; import { SCHEMA_NAME_VALIDATION_PATTERN } from 'lib/constants';
import { useHistory, useParams } from 'react-router'; import { useHistory, useParams } from 'react-router';
export interface NewProps { export interface NewProps {
createSchema: ( createSchema: (
clusterName: ClusterName, clusterName: ClusterName,
subject: SchemaName,
newSchemaSubject: NewSchemaSubject newSchemaSubject: NewSchemaSubject
) => void; ) => void;
} }
@ -29,7 +28,11 @@ const New: React.FC<NewProps> = ({ createSchema }) => {
const onSubmit = React.useCallback( const onSubmit = React.useCallback(
async ({ subject, schema }: NewSchemaSubjectRaw) => { async ({ subject, schema }: NewSchemaSubjectRaw) => {
try { try {
await createSchema(clusterName, subject, { schema }); await createSchema(clusterName, {
subject,
schema,
schemaType: SchemaType.AVRO,
});
history.push(clusterSchemaPath(clusterName, subject)); history.push(clusterSchemaPath(clusterName, subject));
} catch (e) { } catch (e) {
// Show Error // Show Error

View file

@ -1,4 +1,4 @@
import { ClusterStats, NewSchemaSubject } from 'generated-sources'; import { ClusterStats, NewSchemaSubject, SchemaType } from 'generated-sources';
export const clusterStats: ClusterStats = { export const clusterStats: ClusterStats = {
brokerCount: 1, brokerCount: 1,
@ -13,6 +13,8 @@ export const clusterStats: ClusterStats = {
}; };
export const schemaPayload: NewSchemaSubject = { export const schemaPayload: NewSchemaSubject = {
subject: 'NewSchema',
schema: schema:
'{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
schemaType: SchemaType.JSON,
}; };

View file

@ -108,11 +108,11 @@ describe('Thunks', () => {
describe('createSchema', () => { describe('createSchema', () => {
it('creates POST_SCHEMA__SUCCESS when posting new schema', async () => { it('creates POST_SCHEMA__SUCCESS when posting new schema', async () => {
fetchMock.postOnce(`/api/clusters/${clusterName}/schemas/${subject}`, { fetchMock.postOnce(`/api/clusters/${clusterName}/schemas`, {
body: schemaFixtures.schemaVersionsPayload[0], body: schemaFixtures.schemaVersionsPayload[0],
}); });
await store.dispatch( await store.dispatch(
thunks.createSchema(clusterName, subject, fixtures.schemaPayload) thunks.createSchema(clusterName, fixtures.schemaPayload)
); );
expect(store.getActions()).toEqual([ expect(store.getActions()).toEqual([
actions.createSchemaAction.request(), actions.createSchemaAction.request(),
@ -122,19 +122,15 @@ describe('Thunks', () => {
]); ]);
}); });
// it('creates POST_SCHEMA__FAILURE when posting new schema', async () => { it('creates POST_SCHEMA__FAILURE when posting new schema', async () => {
// fetchMock.postOnce( fetchMock.postOnce(`/api/clusters/${clusterName}/schemas`, 404);
// `/api/clusters/${clusterName}/schemas/${subject}`, await store.dispatch(
// 404 thunks.createSchema(clusterName, fixtures.schemaPayload)
// ); );
// await store.dispatch( expect(store.getActions()).toEqual([
// thunks.createSchema(clusterName, subject, fixtures.schemaPayload) actions.createSchemaAction.request(),
// ); actions.createSchemaAction.failure(),
// expect(store.getActions()).toEqual([ ]);
// actions.createSchemaAction.request(), });
// actions.createSchemaAction.failure(),
// ]);
// expect(store.getActions()).toThrow();
// });
}); });
}); });

View file

@ -285,19 +285,16 @@ export const fetchSchemaVersions = (
export const createSchema = ( export const createSchema = (
clusterName: ClusterName, clusterName: ClusterName,
subject: SchemaName,
newSchemaSubject: NewSchemaSubject newSchemaSubject: NewSchemaSubject
): PromiseThunkResult => async (dispatch) => { ): PromiseThunkResult => async (dispatch) => {
dispatch(actions.createSchemaAction.request()); dispatch(actions.createSchemaAction.request());
try { try {
const schema: SchemaSubject = await apiClient.createNewSchema({ const schema: SchemaSubject = await apiClient.createNewSchema({
clusterName, clusterName,
subject,
newSchemaSubject, newSchemaSubject,
}); });
dispatch(actions.createSchemaAction.success(schema)); dispatch(actions.createSchemaAction.success(schema));
} catch (e) { } catch (e) {
dispatch(actions.createSchemaAction.failure()); dispatch(actions.createSchemaAction.failure());
throw e;
} }
}; };

View file

@ -12,6 +12,7 @@ Object {
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 2, "id": 2,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord2\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord2\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "2", "version": "2",
}, },
@ -19,6 +20,7 @@ Object {
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 4, "id": 4,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord4\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord4\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test2", "subject": "test2",
"version": "3", "version": "3",
}, },
@ -26,6 +28,7 @@ Object {
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 5, "id": 5,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test3", "subject": "test3",
"version": "1", "version": "1",
}, },
@ -43,6 +46,7 @@ Object {
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
}, },
@ -50,6 +54,7 @@ Object {
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 2, "id": 2,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord2\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord2\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "2", "version": "2",
}, },
@ -67,6 +72,7 @@ Object {
"compatibilityLevel": "BACKWARD", "compatibilityLevel": "BACKWARD",
"id": 1, "id": 1,
"schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}", "schema": "{\\"type\\":\\"record\\",\\"name\\":\\"MyRecord1\\",\\"namespace\\":\\"com.mycompany\\",\\"fields\\":[{\\"name\\":\\"id\\",\\"type\\":\\"long\\"}]}",
"schemaType": "JSON",
"subject": "test", "subject": "test",
"version": "1", "version": "1",
}, },

View file

@ -1,5 +1,5 @@
import { SchemasState } from 'redux/interfaces'; import { SchemasState } from 'redux/interfaces';
import { SchemaSubject } from 'generated-sources'; import { SchemaSubject, SchemaType } from 'generated-sources';
export const initialState: SchemasState = { export const initialState: SchemasState = {
byName: {}, byName: {},
@ -15,6 +15,7 @@ export const clusterSchemasPayload: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test3', subject: 'test3',
@ -23,6 +24,7 @@ export const clusterSchemasPayload: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test', subject: 'test',
@ -31,6 +33,7 @@ export const clusterSchemasPayload: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
]; ];
@ -42,6 +45,7 @@ export const schemaVersionsPayload: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord1","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test', subject: 'test',
@ -50,6 +54,7 @@ export const schemaVersionsPayload: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
]; ];
@ -60,6 +65,7 @@ export const newSchemaPayload: SchemaSubject = {
schema: schema:
'{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}; };
export const clusterSchemasPayloadWithNewSchema: SchemaSubject[] = [ export const clusterSchemasPayloadWithNewSchema: SchemaSubject[] = [
@ -70,6 +76,7 @@ export const clusterSchemasPayloadWithNewSchema: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test3', subject: 'test3',
@ -78,6 +85,7 @@ export const clusterSchemasPayloadWithNewSchema: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test', subject: 'test',
@ -86,6 +94,7 @@ export const clusterSchemasPayloadWithNewSchema: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord2","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
{ {
subject: 'test4', subject: 'test4',
@ -94,5 +103,6 @@ export const clusterSchemasPayloadWithNewSchema: SchemaSubject[] = [
schema: schema:
'{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}', '{"type":"record","name":"MyRecord4","namespace":"com.mycompany","fields":[{"name":"id","type":"long"}]}',
compatibilityLevel: 'BACKWARD', compatibilityLevel: 'BACKWARD',
schemaType: SchemaType.JSON,
}, },
]; ];