Skip to content

Releases: aml-org/amf

Changes in 5.0.12

23 Aug 20:19
d6af327
Compare
Choose a tag to compare

What's Changed

Full Changelog: 5.0.11...5.0.12

Changes in 5.0.11

27 Jul 14:14
808a6c5
Compare
Choose a tag to compare

Released Jul 27, 2022.

JS asset

JVM asset

JSON Schema Document

Added support to JSON Schema

Now you can operate with JSON Schema documents as root level elements in AMF.
You can parse, validate and resolve JSON Schemas draft 3, 4, 7, and 2019-09 (in the last case there are some unsupported features, like meta-schema).

How to use it

You need to create a JsonSchemaConfiguration. The other functionalities are quite the same as working with APIs.

val client = JsonSchemaConfiguration.JsonSchema().baseUnitClient()
for {
  parsingResult     <- client.parse("file://pathToYourFile.json")
  validationReport <- client.validate(parsed.baseUnit)
} yield {
 (...)
}

The parsed BaseUnit will be a JsonSchemaDocument. This new kind of Document will have a Shape containing the base schema in the encodes and a list of Shape in the declares containing the schemas under the declaration key. The declaration key must be declarations for the draft before draft 2019-09 and $defs or declarations for draft 2019-09.

To take into account

  • The $schema key specifying the draft is MANDATORY.
  • There only could be one declaration key at the same time ($defs or declarations, not both). If not, an error will be shown.
  • In the validation stage, some basic model validations are applied to the schemas.
  • In the validation stage, examples, defaults, and enum values are validated.
  • For compatibility reasons, the JSON Schemas processed with other configurations are not parsed as a JsonSchemaDocument.
    e.g.: if you parse an OAS API with an OAS configuration, and that OAS API has references to a JSON Schema file. That file is still processed as an ExternalFragment.

What's Changed

Full Changelog: 5.0.10...5.0.11

Changes in 5.0.10

29 Jun 14:07
a4e28fb
Compare
Choose a tag to compare

Released Jun 29, 2022.

JS asset

JVM asset

What's Changed

Full Changelog: 5.0.9...5.0.10

Changes in 5.0.9

31 May 15:22
aa2d1b3
Compare
Choose a tag to compare

Released May 30, 2022.

JS asset

JVM asset

What's Changed

Full Changelog: 5.0.8...5.0.9

Changes in 5.0.8

04 May 14:42
755b8c5
Compare
Choose a tag to compare

Released May 4, 2022.

JS asset

JVM asset

What's Changed

Full Changelog: 5.0.6...5.0.8

Changes in AMF 5.0.6

01 Apr 13:36
5b7bc93
Compare
Choose a tag to compare

Released Mar 31, 2022.

JS asset

JVM asset

Validation changes:

Fixed invalid validation issues:

  • When declaring a security scheme in a RAML library, using it an API and then converting that API to OAS, the generated OAS was invalid for AMF as the security scheme was not in declarations.
  • When including an URI parameter from resourceTypes in endPoints's path, transformation of model resulted in duplicate parameters.

Behavioral changes:

  • In OAS, a new parsing warning has been added for cases in which API defines a new type with pattern and format. This relates to the fact that not custom formats already define a standard pattern.

What's Changed

Full Changelog: 5.0.5...5.0.6

5.0.5

08 Mar 21:12
5741f90
Compare
Choose a tag to compare

Assets

Released Mar 8, 2022.

JS asset
JVM asset

What's Changed

Full Changelog: 5.0.4...5.0.5

Changes in 5.0.4

08 Feb 15:34
814bdd0
Compare
Choose a tag to compare

Released Feb 8, 2022.

JS asset

JVM asset

New Features

Semantic Extensions

This release contains the official support of "Semantic Extensions". To know more about this feature you can see the docs and the examples

Relevant changes:

Unified path normalization behaviour for JS distribution

The implementation used to normalize paths in AMF was adjusted in JS to align its implementation with JVM. Both now rely on java.net.URI, which has a native implementation provided by scala.js for JS.
This change was relevant for solving APIMF-3517.

AMF Fixed issues

GitHub issues fixed

Changes in 5.0.3

13 Jan 16:46
86a75cd
Compare
Choose a tag to compare

Released Jan 15, 2022.

JS asset

JVM asset

Relevant changes:

Simple inheritance and examples

A simple inheritance is when a type is a child of a parent type, and it defines no properties, or only properties that are documentation related and don't change the behavior or the schema.

These are some examples of simple inheritance in RAML:

BaseTypeString: # base type
    displayName: base type
    description: description of base type
    type: string
    example: "base example"

  # simplest single inheritance
  inline-string: BaseTypeString 

  # similar to inline but more verbose
  simple-inheritance-string:
    type: BaseTypeString 

  # fields like description, displayName, or example don't change the schema, thus this type is still a simple inheritance
  simple-inheritance-with-doc-string: 
    type: BaseTypeString
    description: Description of the simple inheritance type

  # this type defines a `maxLength`, this is not a simple inheritance
  complex-inheritance-string:
    type: BaseTypeString
    description: Description of the complex inheritance type
    maxLength: 3

Previously, the example of the parent type was put into the child type only if it was an inline simple inheritance, now they propagate in any kind of simple inheritance, as we are sure that they will still be valid.

Furthermore, in RAML 0.8 when an example was an invalid reference, the example field and it's metadata was not parsed into the model. Now it's created with an empty example list as it's done in the other specs.

AMF Fixed issues

GitHub issues fixed

Changes in 5.0.2

14 Dec 12:39
c35b590
Compare
Choose a tag to compare