Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
comcalvi committed Sep 9, 2024
1 parent 555f27d commit e4d18db
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,30 +86,6 @@ export namespace jsonschema {

/**
* Determines whether or not the provided schema represents an `anyOf` type operator.
*
* Examples:
*
* const schema = {
* "anyOf": [
* { schema 1 },
* { schema 2 },
* { schema 3 }
* ]
* };
* jsonschema.isAnyOf(schema) -> true
*
* const schema = {
* "type": "string",
* "anyOf": [
* { schema 1 },
* { schema 2 },
* { schema 3 }
* ]
* };
* jsonschema.isAnyOf(schema) -> false
*
*
* @returns true if the schema represents an `anyOf` type operator. Otherwise, false.
*/
export function isAnyOf(x: Schema): x is AnyOf<any> {
return !isAnyType(x) && 'anyOf' in x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ test('oneOf with only a reference', () => {
const requiredProps = Object.entries(resource.properties)
.filter(([_, value]) => value.required)
.map(([name, _]) => name);
//expect(Object.keys(resource.properties)).toContain('OneOfRef');
expect(Object.keys(resource.properties)).toContain('OneOfRef');
expect(requiredProps.length).toBe(0);
});

Expand Down Expand Up @@ -392,7 +392,6 @@ test('oneOf with only a type definition', () => {
const requiredProps = Object.entries(resource.properties)
.filter(([_, value]) => value.required)
.map(([name, _]) => name);
//report.write('foobar');
expect(Object.keys(resource.properties)).toContain('FooOrBar');
expect(requiredProps.length).toBe(0);
});
Expand Down
2 changes: 1 addition & 1 deletion projenrc/aws-cdk-integration-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class AwsCdkIntegrationTest extends pj.Component {
...buildAwsCdkLib(awsCdkRepo, awsCdkPath),
// Temporarily disabled, as it regularly prevents legitimate spec imports with intentional breaking changes.
// Instead, we need to add more purposeful validations like type renames.
...runJsiiDiff(candidateSpec, diffIgnoreFile),
//...runJsiiDiff(candidateSpec, diffIgnoreFile),
],
});
void runJsiiDiff, candidateSpec, diffIgnoreFile;
Expand Down

0 comments on commit e4d18db

Please sign in to comment.