get-graphql-from-jsonschema
Advanced tools
Comparing version 6.0.5 to 7.0.0
import { Direction } from './Direction'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
declare const getGraphqlFromJsonSchema: ({ rootName, schema, direction }: { | ||
rootName: string; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction?: "input" | "output" | undefined; | ||
@@ -7,0 +7,0 @@ }) => { |
import { Direction } from './Direction'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
declare const handleArrayType: ({ path, schema, direction }: { | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -7,0 +7,0 @@ }) => { |
import { Direction } from './Direction'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
declare const handleObjectType: ({ path, schema, direction }: { | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -7,0 +7,0 @@ }) => { |
import { Direction } from './Direction'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
declare const parseOneOf: ({ path, schema, direction }: { | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -7,0 +7,0 @@ }) => { |
import { Direction } from './Direction'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
declare const parseSchema: ({ path, schema, direction }: { | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -7,0 +7,0 @@ }) => { |
import { Direction } from './Direction'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
declare const parseType: ({ path, schema, direction }: { | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -7,0 +7,0 @@ }) => { |
@@ -0,1 +1,13 @@ | ||
# [7.0.0](https://github.com/thenativeweb/get-graphql-from-jsonschema/compare/6.0.5...7.0.0) (2020-11-13) | ||
### Features | ||
* Migrate to JSONSchema7. ([#197](https://github.com/thenativeweb/get-graphql-from-jsonschema/issues/197)) ([ad0290f](https://github.com/thenativeweb/get-graphql-from-jsonschema/commit/ad0290f37c3093c182febb1694b2ae72d260fa2a)) | ||
### BREAKING CHANGES | ||
* Types are new incompatible with the previously used JSONSchema4 type. | ||
## [6.0.5](https://github.com/thenativeweb/get-graphql-from-jsonschema/compare/6.0.4...6.0.5) (2020-11-03) | ||
@@ -2,0 +14,0 @@ |
import { Direction } from './Direction'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
import { parseSchema } from './parseSchema'; | ||
@@ -7,3 +7,3 @@ | ||
rootName: string; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction?: Direction; | ||
@@ -10,0 +10,0 @@ }): { typeName: string; typeDefinitions: string[] } { |
import { Direction } from './Direction'; | ||
import { errors } from './errors'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
import { parseSchema } from './parseSchema'; | ||
@@ -9,3 +9,3 @@ import { toBreadcrumb } from './toBreadcrumb'; | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -23,3 +23,3 @@ }): { typeName: string; typeDefinitions: string[] } { | ||
typeDefinitions: graphqlTypeDefinitions | ||
} = parseSchema({ path, schema: schema.items, direction }); | ||
} = parseSchema({ path, schema: schema.items as JSONSchema7, direction }); | ||
@@ -26,0 +26,0 @@ return { |
import { Direction } from './Direction'; | ||
import { errors } from './errors'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
import { parseSchema } from './parseSchema'; | ||
@@ -10,3 +10,3 @@ import { toBreadcrumb } from './toBreadcrumb'; | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -36,3 +36,3 @@ }): { typeName: string; typeDefinitions: string[] } { | ||
path: [ ...path, propertyName ], | ||
schema: propertySchema, | ||
schema: propertySchema as JSONSchema7, | ||
direction | ||
@@ -39,0 +39,0 @@ }); |
import { Direction } from './Direction'; | ||
import { errors } from './errors'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
import { parseSchema } from './parseSchema'; | ||
@@ -9,3 +9,3 @@ import { toBreadcrumb } from './toBreadcrumb'; | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -24,3 +24,3 @@ }): { typeName: string; typeDefinitions: string[] } { | ||
schema.oneOf.forEach((subSchema, index): void => { | ||
const result = parseSchema({ schema: subSchema, direction, path: [ ...path, `I${index}` ]}); | ||
const result = parseSchema({ schema: subSchema as JSONSchema7, direction, path: [ ...path, `I${index}` ]}); | ||
@@ -27,0 +27,0 @@ graphqlTypeNames.push(result.typeName); |
import { Direction } from './Direction'; | ||
import { errors } from './errors'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
import { parseOneOf } from './parseOneOf'; | ||
@@ -12,3 +12,3 @@ import { parseType } from './parseType'; | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -15,0 +15,0 @@ }): { typeName: string; typeDefinitions: string[] } { |
@@ -9,3 +9,3 @@ import { Direction } from './Direction'; | ||
import { isScalarType } from './isScalarType'; | ||
import { JSONSchema4 } from 'json-schema'; | ||
import { JSONSchema7 } from 'json-schema'; | ||
import { toBreadcrumb } from './toBreadcrumb'; | ||
@@ -15,3 +15,3 @@ | ||
path: string[]; | ||
schema: JSONSchema4; | ||
schema: JSONSchema7; | ||
direction: Direction; | ||
@@ -18,0 +18,0 @@ }): { typeName: string; typeDefinitions: string[] } { |
{ | ||
"name": "get-graphql-from-jsonschema", | ||
"version": "6.0.5", | ||
"version": "7.0.0", | ||
"description": "get-graphql-from-jsonschema gets a GraphQL schema from a JSON schema.", | ||
@@ -24,5 +24,5 @@ "contributors": [ | ||
"devDependencies": { | ||
"assertthat": "5.2.1", | ||
"assertthat": "5.2.5", | ||
"roboter": "11.4.2", | ||
"semantic-release-configuration": "1.0.24" | ||
"semantic-release-configuration": "1.0.25" | ||
}, | ||
@@ -29,0 +29,0 @@ "repository": { |
35536