github Urigo/graphql-mesh json-machete@0.10.0

latest releases: release-1660141840432, json-machete@0.11.1, @omnigraph/raml@0.5.64...
2 years ago

Minor Changes

  • eade5bb: New noDeduplication flag

    By default, JSON Schema handler tries to deduplicate similar JSON Schema types;

    Let's say we have the following JSON Schema;

    {
      "definitions": {
        "Book": {
          "type": "object",
          "title": "Book",
          "properties": {
            "title": {
              "type": "string"
            },
            "author": {
              "type": "string"
            },
            "price": {
              "type": "number"
            },
            "similarBooks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SimilarBook"
              }
            }
          }
        },
        "SimilarBook": {
          "type": "object",
          "title": "Book",
          "properties": {
            "title": {
              "type": "string"
            },
            "author": {
              "type": "string"
            },
            "price": {
              "type": "number"
            },
            "similarBooks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SimilarBook"
              }
            }
          }
        }
      }
    }

    And the result will be the following by default;

    type Book {
      title: String
      author: String
      price: Float
      similarBooks: [Book]
    }

    But if you set this flag true, it will not deduplicate similar JSON Schema types;

    type Book {
      title: String
      author: String
      price: Float
      similarBooks: [SimilarBook]
    }
    
    type SimilarBook {
      title: String
      author: String
      price: Float
      similarBooks: [SimilarBook]
    }

Patch Changes

  • Updated dependencies [6e6fd4a]
    • @graphql-mesh/utils@0.37.1

Don't miss a new graphql-mesh release

NewReleases is sending notifications on new releases.