Skip to content
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

Update kubernetes schema to 1.17.0... again #236

Merged
merged 1 commit into from
Feb 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/languageservice/utils/schemaUrls.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const KUBERNETES_SCHEMA_URL = 'https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.14.0-standalone-strict/all.json';
export const KUBERNETES_SCHEMA_URL = 'https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.17.0-standalone-strict/all.json';
export const JSON_SCHEMASTORE_URL = 'http://schemastore.org/api/json/catalog.json';
2 changes: 1 addition & 1 deletion test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MarkedString } from '../src';

const languageService = getLanguageService(schemaRequestService, workspaceContext, [], null);

const uri = 'https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.14.0-standalone-strict/all.json';
const uri = 'https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.17.0-standalone-strict/all.json';
const languageSettings: LanguageSettings = {
schemas: [],
validate: true,
Expand Down
8 changes: 4 additions & 4 deletions test/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ suite('JSON Schema', () => {

await service.addContent({
action: MODIFICATION_ACTIONS.add,
path: 'oneOf/0/properties/kind',
path: 'oneOf/1/properties/kind',
key: 'enum',
content: [
'v2',
Expand All @@ -435,7 +435,7 @@ suite('JSON Schema', () => {
});

const fs = await service.getResolvedSchema(KUBERNETES_SCHEMA_URL);
assert.deepEqual(fs.schema.oneOf[0].properties['kind']['enum'], ['v2', 'v3']);
assert.deepEqual(fs.schema.oneOf[1].properties['kind']['enum'], ['v2', 'v3']);
});

test('Deleting schema works with Kubernetes resolution', async () => {
Expand All @@ -444,13 +444,13 @@ suite('JSON Schema', () => {

await service.deleteContent({
action: MODIFICATION_ACTIONS.delete,
path: 'oneOf/0/properties/kind',
path: 'oneOf/1/properties/kind',
key: 'enum',
schema: KUBERNETES_SCHEMA_URL
});

const fs = await service.getResolvedSchema(KUBERNETES_SCHEMA_URL);
assert.equal(fs.schema.oneOf[0].properties['kind']['enum'], undefined);
assert.equal(fs.schema.oneOf[1].properties['kind']['enum'], undefined);
});

test('Adding a brand new schema', async () => {
Expand Down