Changes in AMF 4.1.0
Interface Changes
Thread Management (JAVA only)
This version allows creating an "ExecutionEnvironment" using a Java ScheduledExecutorService. The internal AMF threads are created in the thread pool provided by that scheduler instead of the global thread pool provided by Scala. This enables implementers to handle the pool size & other tunings on their own.
The following interfaces can now receive this:
- amf.client.AMF.init()
- amf.client.AMF.platform()
- amf.client.AMF.registerDialect()
- amf.client.environment.Environment.executionEnvironment()
- amf.Core.generator()
- amf.Core.init()
- amf.Core.parser()
- amf.plugins.document.Vocabularies.registerDialect()
- amf.plugins.document.WebApi.register()
- amf.plugins.features.validation.SHACLValidator.report()
- amf.plugins.features.validation.SHACLValidator.validate()
- AnyShape.buildJsonSchema()
- AnyShape.buildRamlDatatype()
- AnyShape.parameterValidator()
- AnyShape.payloadValidator()
- AnyShape.toJsonSchema()
- AnyShape.toRamlDatatype()
- AnyShape.validate()
- AnyShape.validateParameter()
In order to build it, you have to use an "ScheduledExecutorService" in
- amf.client.execution.ExecutionEnvironment()
OperationModel
operationId was added to OperationModel
- amf.client.model.domain.Operation.operationId()
- amf.client.model.domain.Operation.withOperationId()
Validation Changes
OAS Validation with references
OAS references to external YAML files is now supported.
For example, the following api definition will now be valid:
root.yaml
swagger: "2.0"
info:
version: 1.0.0
title: Swagger Petstore
paths:
/pets:
get:
responses:
"200":
description: unexpected error
schema:
$ref: 'ref.yaml'
ref.yaml
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
AMF Fixed issues
- APIMF-2045 - Console is getting stuck with large API
- APIMF-2042 - Singularize is changing initiative into initiatife
- APIMF-2035 - Clone method does not set parser run at references
- APIMF-2032 - No error when a node name starts with / and is at paths node level (OAS 2 JSON)
- APIMF-2025 - OAS2 $ref to .yaml file is not supported
- APIMF-2024 - AMF Parser leaks memory every time an API is parsed
- APIMF-2023 - "Unresolved reference" error reported randomly
- APIMF-2016 - SE: Design Center showed "Error recursive shape" when referring Exchange Library type
- APIMF-1993 - AMF should fold from inner to outer refs