Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Releases: apiaryio/fury-adapter-swagger

0.22.7

11 Dec 16:21
Compare
Choose a tag to compare

Bug Fixes

  • Adds support for generating JSON bodies for schemas where the root is an
    array. For example, given following array schema:

    type: array
    items:
      type: string
      example: Doe

    The parser will now generate a JSON body of ["Doe"] whereas in previous
    versions would've resulted in an empty array.

  • Fixes parsing Swagger documents that contain properties called $ref.
    Previously the parser would attempt to dereference the property as would
    generically try to dereference any key in an object called $ref, as per the
    JSON Schema specification, references are only permitted when a schema type
    is expected.

    For example, the following is a schema which is trying to describe an object
    with a property called $ref, previously the parser would attempt to
    dereference $ref and crash in the process.

    type: object
    properties:
      $ref:
        type: string
        example: '#/definitions/User'
    required: ['$ref']

    There is a still an open known issue
    #235 that
    uses of $ref in a Swagger 2 document where the value a string will cause
    the parser to attempt to dereference it incorrectly when the $ref property
    is found on an object that does not support $ref as per the Swagger 2 and
    JSON Schema specifications.

0.22.6

07 Dec 23:39
Compare
Choose a tag to compare

Enhancements

  • While generating a data structure from a Swagger Schema, we will now attempt
    to infer when the schema should be an object but the user has forgotten to
    put type: object by looking for the presence of properties in the schema.

  • Adds support for object inheritance and mixins via allOf referencing in
    data structure generation.

    For example, the following will create an object which inherits from User:

    allOf:
      - $ref: '#/definitions/User'
      - properties:
          id:
            type: string

    Secondly, when you reference multiple objects using allOf they will be
    treated as mixins:

    allOf:
      - $ref: '#/definitions/BaseUser'
      - $ref: '#/definitions/UserMixin'

Bug Fixes

  • Fixes using x-nullable in a schema which previously caused the schema not
    to be converted to a data structure. For example, the following schema
    wouldn't result in a data structure:

    type: string
    x-nullable: true
  • Fixes some cases where rendering a JSON example from a Swagger Schema using
    example values which contain references would fail.

0.22.4

29 Nov 19:37
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a regression introduced in 0.22.3 which caused a reference ($ref)
    from a definition to another definitions example value to fail.

0.22.3

27 Nov 22:31
Compare
Choose a tag to compare

Bug Fixes

  • Example values in nested Schema Object will now be used for JSON body
    generation.

0.22.2

25 Oct 16:04
Compare
Choose a tag to compare
  • Fixes a regression introduced in 0.22.0 where using $ref directly inside a
    Swagger Schema found within the definitions section would cause a parsing
    failure.

0.22.1

23 Oct 18:30
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a regression introduced in 0.22.0 where the parse result may contain
    invalid references inside a JSON Schema for example values if they used
    references. This regression also caused $ref to be incorrectly present in
    Data Structure sample values.

0.22.0

11 Oct 13:28
233feac
Compare
Choose a tag to compare

Enhancements

  • Adds a dataStructures section to the parse result containing every data structure found within the definitions section of a Swagger document. We now use referencing between data structures found within a request or response data structure which generally makes parse results smaller instead of duplicating the data structure contents.

Bug Fixes

  • Adds support for primitive request bodies.

0.21.1

10 Sep 13:10
Compare
Choose a tag to compare

Bug Fixes

  • No longer expand all option values (properties, array values) etc in the case
    that a schema has a circular reference.

0.21.0

07 Sep 13:52
Compare
Choose a tag to compare

Enhancements

  • Line and column numbers are now exposed in the parse result in source maps
    for annotation elements.

Bug Fixes

  • Default and example values for headers are now validated to match the header
    type. For example, placing a string as a value for a number type header will
    now emit a warning.

  • Header values will now contain source map information in the parse result.

  • Fix support for type file in multipart-form body generation.

0.20.0

04 Sep 17:05
Compare
Choose a tag to compare

Enhancements

  • The API Version is now exposed in the parse result. The API category now
    contains a version attribute including the API version.

  • Circular references are now supported in schemas and JSON and JSON Schemas
    will now be present in parse results when you use circular references.

Bug Fixes

  • Example values in a Schema Object will now be placed into the dataStructure
    as a value instead of inside samples in cases where there isn't already a
    value.