Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Releases: raml-org/webapi-parser

Changes in v0.5.0

31 Jan 07:12
Compare
Choose a tag to compare

Added OAS 3.0 support (beta)

Methods names and interfaces are identical to those of OAS 2.0 but reside in a WebApiParser.oas30 namespace for JS and webapi.Oas30 for Java.

Updated AMF to to 4.0.3

The updated caused following changes. See AMF 4.0.3 release notes for more details.

Below are security model changes described in detail.

Security API change (BREAKING):

Changed type of WebApi, EndPoint, Operation field security and input type of method withSecurity from ParametrizedSecurityScheme[] to SecurityRequirement[].

Where obj is an instance of one of - WebApi, EndPoint, Operation:

Before:

obj.security: ParametrizedSecurityScheme[]
obj.withSecurity(security: ParametrizedSecurityScheme[])

Now:

obj.security: SecurityRequirement[]
obj.withSecurity(security: SecurityRequirement[])

Migration:

obj.security[0] -> obj.security[0].schemes[0]

OAuth2 Settings API change (BREAKING):

New OAuth2Settings fields added:

OAuth2Settings.flows: OAuth2Flow[]
OAuth2Settings.withFlows(flows: OAuth2Flow[]): this

Most of OAuth2Settings methods and fields[1] moved to OAuth2Flow.

[1] authorizationUri, accessTokenUri, flow, refreshUri, scopes, authorizationGrants, withAuthorizationUri, withAccessTokenUri, withFlow, withRefreshUri, withScope.

Updated Scala plugins:

  • sbt-scalajs-crossproject 0.6.0 -> 0.6.1
  • sbt-scalajs 0.6.25 -> 0.6.29
  • sbt-scoverage 1.5.1 -> 1.6.0

Changes in v0.4.1

14 Jan 10:30
Compare
Choose a tag to compare

JS:
Fix typescript types definitions to address #67.

Java:
Nothing changed.

Changes in 0.4.0

02 Dec 08:03
Compare
Choose a tag to compare

Fixes:

  • Missing readme in npm package #44
  • JS validation demo logging #55

Possible breaking change:
Upgraded AMF 3.5.4 -> 4.0.2 .
This changes JSON-LD model. This change does not affect the use of the object model of webapi-parser (interfaces remain the same).
See AMF 4.0.1 release notes for more details: https://github.com/aml-org/amf/releases/tag/4.0.1

Changes in 0.3.2

10 Oct 08:56
Compare
Choose a tag to compare

Changes in 0.3.1

23 Sep 06:12
Compare
Choose a tag to compare

AMF upgraded to 3.5.1.

Changes in 0.3.0

17 Sep 07:55
Compare
Choose a tag to compare

Breaking Interface Changes

Due to AMF 3.3.0 release.

ScalarNode value & dataType methods now return a StrField instead of String.
i.e.

ScalarNode.value => ScalarNode.value.value()
ScalarNode.dataType => ScalarNode.dataType.value()

To handle null values you can use option:

ScalarNode.value => ScalarNode.value.option()
ScalarNode.dataType => ScalarNode.dataType.option()

New Interface

All syntaxes' parse() methods [1] now accept second argument when parsing a content string:

  • baseUrl - Location to assign to a document parsed from a content string. Also references are resolved relative to this location.

See JS and Java RAML 1.0 examples for usage details.

[1] raml10.parse(), raml08.parse(), oas20.parse(), oas20.parseYaml(), amfGraph.parse().

Improve WebApiBaseUnit.getDeclarationByName

23 Jul 05:58
Compare
Choose a tag to compare

Reworked WebApiBaseUnit.getDeclarationByName to return all valid declarations of RAML 1.0 Data Types.

All of the changes come from PR #30

Breaking changes

This release presents potentially breaking changes for Java users. In particular WebApiBaseUnit.getDeclarationByName now returns an instance of amf.client.model.domain.AnyShape instead of amf.client.model.domain.NodeShape. Note that NodeShape is a subclass of AnyShape as API docs state.

Considering this, you might need to explicitly convert an instance of AnyShape returned by WebApiBaseUnit.getDeclarationByName to its subclasses to access subclass-specific properties.

E.g. to access UnionShape.anyOf property you would have to do:

UnionShape user = (UnionShape) model.getDeclarationByName("User");
System.out.println(user.anyOf());

JS users should face no breaking changes.