Releases: aml-org/amf
Changes in 5.0.12
What's Changed
- W-11047366: validate input types in graphql by @arielmirra in #1506
- W-11460908: fix descriptions parsing in GraphQL by @nschejtman in #1510
- release/5.0.11 to develop by @looseale in #1515
- W-11460908: fixed non-federation directives parsing in federation by @nschejtman in #1512
- W-11425840: fix position and range in various reports by @arielmirra in #1517
- W-11086996: added introspection types for GraphQL Federation transformation by @tomsfernandez in #1518
- W 11309346 by @nschejtman in #1516
- W-11047389: validate output fields by @arielmirra in #1520
- W-11046869: validate missing arguments in graphql directives by @arielmirra in #1522
- W-11087059/extend-query-introspection by @tomsfernandez in #1521
- W 11086840 by @nschejtman in #1523
- W-11274653: Add GraphQL + Federation to SourceMapsAnnotationsTest by @arielmirra in #1524
- W 11086914 by @nschejtman in #1525
- W 11047867 by @nschejtman in #1527
- W-11404638: Fix missing example validation in Union by @hghianni in #1526
- Added code format to URIs in the model to avoid link formatting by @looseale in #1528
- W-11539428: fix parsing directive applications within directive declarations by @nschejtman in #1529
- W-11086790/graphql-validations-federation by @tomsfernandez in #1530
- Fixed JsonSchemaConfig client interface by @looseale in #1531
- Added JsonSchemaDocument wrapper by @looseale in #1533
- W-11090478: GraphQL Rendering Setup by @arielmirra in #1532
- W 11542738 by @nschejtman in #1534
- W-11460908: make custom scalars of type xsd.any without format by @nschejtman in #1535
- W-11548738, W-11090489 & W-11548639: GraphQL emission by @hghianni in #1536
- W 11541069 by @nschejtman in #1537
- Added missing GraphQL typing by @looseale in #1538
- W-11437709: Move validations from Parsing to Validation stage by @hghianni in #1539
- W-11542455: adopted new amf-antlr-parsers npm package to fix JS exported execution by @tomsfernandez in #1540
- W-11578656: Refactor GraphQL emitters by @hghianni in #1541
- W-11349298: Fix duplicated resource path in OAS by @hghianni in #1544
- Add properties field in oas parser if properties entry is present (#1… by @looseale in #1556
Full Changelog: 5.0.11...5.0.12
Changes in 5.0.11
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 isMANDATORY
. - There only could be one declaration key at the same time (
$defs
ordeclarations
, 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 anExternalFragment
.
What's Changed
- W-11233146: fix some interface methods by @arielmirra in #1454
- W-11241856: make validation severity thrown by ApiContractFallbackPlugin customizable by @nschejtman in #1463
- W-11178013: complete refactor of the Raml Json Schema Parser, reference parsing in OAS and parsing context methods. by @tomsfernandez in #1451
- Adopt new ast annotation. Minor graphql changes by @pope1838 in #1325
- chore: bumped amf-antlr-ast to 0.5.1 by @tomsfernandez in #1468
- add ADR 11: annotations lifespan interfaces by @arielmirra in #1466
- W-11047847 & W-11047858 by @arielmirra in #1469
- Define amf-antlr version at .versions file by @pope1838 in #1470
- W 11063850 by @nschejtman in #1467
- W-11047878: Add invalid name validation for GraphQL by @hghianni in #1471
- W-11027843: Add duplicated field validation for GraphQL by @hghianni in #1472
- W-11063850: more boilerplate by @nschejtman in #1474
- W-11046724: Add duplicated argument validation for GraphQL by @hghianni in #1473
- W-11131240 - Updated json and other dependencies by @looseale in #1476
- W-11046729 & W-11047884 validations by @hghianni in #1477
- add cache pipeline to graphql validation tests by @arielmirra in #1478
- W-11046870: add initial graphql validation by @arielmirra in #1459
- W 11386887/debt/shape parser context refactor by @tomsfernandez in #1475
- W-11415904: Fix only parsing one interface implementation in GraphQL by @hghianni in #1480
- W-11047651: validate that union members must be object type by @arielmirra in #1481
- W 11046755, W-11046765 & W-11046733 validations by @hghianni in #1483
- Json schema fragment base classes by @looseale in #1485
- W-11415653 - Adding missing modelDoc to JsonSchemaDocument by @looseale in #1486
- W-11343511: minor graphql refactors by @arielmirra in #1484
- W-11086511: added Federation TCK by @nschejtman in #1487
- W-11178130 - Added adapter needed from APB to implement JSON Schema F… by @looseale in #1488
- W-10672168: Fix some lexicals in GraphQL by @hghianni in #1489
- Add builder for json schema at api configuraiton. Implement registrer… by @pope1838 in #1493
- W-11046889: validate empty definitions by @arielmirra in #1494
- Add JsonSchema configuration tests by @pope1838 in #1496
- W 11178034/feat/json document refs by @tomsfernandez in #1491
- W-11410812 - Support in draft 2019 as declarations key along with by @looseale in #1495
- W-11086555: added Federation model by @nschejtman in #1479
- W-11460908: fix scaladoc by @nschejtman in #1499
- W-11046845: validate required fields in graphql by @arielmirra in #1497
- W-11178034: added check by ref origin in external fragment reference resolution for APB compatibility by @tomsfernandez in #1498
- W-11456734 - Added validation for Json Schema Configuration by @looseale in #1500
- W 11412688 by @nschejtman in #1501
- W-11470045 - Change severity of multiple def keys to violation and ad… by @looseale in #1503
- W-11415930 - Added resolution suite by @looseale in #1504
- W-11460908 - Bump model version due changes in GraphQL model by @looseale in #1505
- update typings with federation and jsonschema types by @arielmirra in #1511
Full Changelog: 5.0.10...5.0.11
Changes in 5.0.10
What's Changed
- W-11208538 - Added tests for SemEx transformation changes in AML by @looseale in #1415
- W-11210133: test fix in semex lexicals by @arielmirra in #1419
- W 10674627: parse GraphQL type extensions by @nschejtman in #1416
- W-10671740: Directive applications parsing by @arielmirra in #1427
- Use JDK 11 in docker by @looseale in #1432
- Update JDK to 11 by @looseale in #1433
- chore: changed sonarqube properties config and coverage generation because of a broken integration with sonarqube scala by @tomsfernandez in #1436
- W-10671740: fix null ids in query payloads by @arielmirra in #1431
- some fixes by @nschejtman in #1437
- W-11172918: Fix OAS annotations not being parsed by @hghianni in #1430
- W-11046870: chore: remove profile arguments from validate by @arielmirra in #1438
- chore: updated base image with amf's custom image by @tomsfernandez in #1439
- W-11172094: Fix unresolved reference to parameter by @hghianni in #1441
- final id graphql by @nschejtman in #1442
- W-11147578: Add hasExplicitName method for Shapes by @hghianni in #1444
- jenkins: updated triggers and did a little cleanup by @tomsfernandez in #1445
- W-11210878/jenkins-triggers-fix by @tomsfernandez in #1446
- W-11172465 - Added break condition for SemanticJSONSchema according t… by @looseale in #1448
- W 11048457 by @nschejtman in #1447
- W-11332855 & W-11046870 by @arielmirra in #1449
- W-11235868: update typings by @arielmirra in #1456
Full Changelog: 5.0.9...5.0.10
Changes in 5.0.9
What's Changed
- W-11075212: add inferred annotation to Encodes field in RAML fragments by @arielmirra in #1394
- W 10867566 by @nschejtman in #1393
- W-11019701: update typings with graphql models by @arielmirra in #1396
- W-10868643: add argument default value parsing by @arielmirra in #1401
- W-10984948 - Added long datatype as default type convertion for integ… by @looseale in #1402
- W-10548016: Fix traits not being applied to some operations of an extension by @hghianni in #1403
- W-11085513: set correct ID for null wraper union shapes in GraphQL by @nschejtman in #1409
- W-11155271: Add allowList for rendering annotations by @hghianni in #1410
- W-11105504: some fixes by @nschejtman in #1412
- W-11187481 - Added default shape to SemEx CustomDomainProperty by @looseale in #1413
- W-11155117 - Typings and publish RC.2 by @looseale in #1420
Full Changelog: 5.0.8...5.0.9
Changes in 5.0.8
What's Changed
- W-10881268 - Changed transformer to use allOf and oneOf instead of inh… by @looseale in #1360
- W 10881268 extended schemas refactor by @looseale in #1364
- publish: 5.1.0-snapshot by @tomsfernandez in #1369
- jenkinsfile-fix by @tomsfernandez in #1370
- Added GraphQL TCK, Dataset, sanitization & linting script by @nschejtman in #1346
- W10881317: uncommented tests thanks to support in amf-aml by @tomsfernandez in #1373
- W-10924481 - Refactor of vocabulary generator to detect term collisio… by @looseale in #1371
- Add validation of schema for api-extensions by @pope1838 in #1372
- W-10737835: export content.url, add annotations to xml parsed shapes, fix typings by @arielmirra in #1354
- W-10882348: (fix) allow only letters and numbers in a semschema name. Capped the name to 60 chars by @tomsfernandez in #1374
- W 10935376/number to double semschema by @looseale in #1376
- W-10858693: (test) adopted change in syaml to be able to emit dashes as scalars in YAML by @tomsfernandez in #1375
- W-10868059 by @hghianni in #1377
- Update tippings by @looseale in #1378
- W 10671678 by @nschejtman in #1380
- W-10974844 - Changes SemJsonSchema conversion for arrays by @looseale in #1381
- W-10671849: update GraphQL TCK by @nschejtman in #1384
- W 10868609 by @nschejtman in #1385
- W-10547488: Fixed exceptions thrown in Emitters by @hghianni in #1388
- W-11017124 - Fix error in generated vocab with multiple semantics in … by @looseale in #1389
- W 10674610 by @nschejtman in #1387
- W-10823352: Fix unresolved second level references by @hghianni in #1386
- W-10671730: add graphql directives parsing by @arielmirra in #1390
- W-10671678: change display names of abstract & shape operation models by @nschejtman in #1391
Full Changelog: 5.0.6...5.0.8
Changes in AMF 5.0.6
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
- APIMF-3678: Fix loosing referenced request annotations by @hghianni in #1326
- Add graphql source spec at graphql document parser by @pope1838 in #1333
- Release 5.0.5 to develop by @looseale in #1337
- W-10737157: Add warning for format and pattern combination by @hghianni in #1330
- W-10548827/jenkinsfile-js-publish by @tomsfernandez in #1341
- W-10803434/additional-properties-semschema by @tomsfernandez in #1339
- W-10823102 - Implement little changes related with if/then/else issue by @looseale in #1345
- W 10784090: Add external security schemes to declares when converting raml to oas by @hghianni in #1348
- W-10663809 - Added in conversion support to extended schemas and if/then/else by @looseale in #1347
- W-10858047 - Added transformation support to if without else by @looseale in #1349
- W-10547555: adopted amf-aml changes for non-string literal enum support in Dialects by @tomsfernandez in #1350
- W-10858591 - Added test of schema object without properties. This was… by @looseale in #1351
- W-108575050: added small fix to avoid duplicate semantics in extended if then example by @tomsfernandez in #1352
- W-10881227 - Added new AML model to doc test by @looseale in #1356
- W-10815397: Fix: Parameters with default annotation were not remove from endpoints by @hghianni in #1357
- Support aliased semex through companion libs by @pope1838 in #1343
- publish 5.0.6-RC.0 by @arielmirra in #1359
- (publish): Publish RC.1 because JS package was published wrong. by @tomsfernandez in #1363
- Update typings by @hghianni in #1365
- publish-setup: 5.0.6 by @tomsfernandez in #1366
- publish-setup: 5.0.6 part 2 by @tomsfernandez in #1367
- publish: 5.0.6 by @tomsfernandez in #1368
Full Changelog: 5.0.5...5.0.6
5.0.5
Assets
What's Changed
- APIMF-3678: Fix Request annotations and change expects field to be inferred by @hghianni in #1294
- Interfaces: added client interfaces for GRPC config and GRAPHQL config by @tomsfernandez in #1296
- Adopt validation profile & report artifacts on ad-hoc cli by @nschejtman in #1295
- publish 5.1.0 snapshot by @nschejtman in #1300
- Semantic JSON Schema by @looseale in #1302
- W-10663499: fix adhoc cli parsing using dialects for jar artifact by @AgustinBettati in #1308
- W-10683015: added method to add a list of requests by @looseale in #1310
- W-10667975: changed applies of plugin to process unidentified JSONs a… by @looseale in #1309
- Added missing ModelDoc to root fields of SemJson by @looseale in #1311
- APIMF-2698: Add boolean schemas by @hghianni in #1313
- Silence sbt warning for unused apiContractModelVersion key by @nschejtman in #1315
- non breaking refactors by @nschejtman in #1314
- Changed field name from 'null' to 'nulled' to avoid possible problems by @looseale in #1316
- Add interface to parse from content to SemanticBaseUnitClient by @looseale in #1317
- Remove allowCycleClasses from ShapeTraversalRegistry by @nschejtman in #1318
- Change unnaply of result by @looseale in #1319
- APIMF-3679: Fix: Shape's lexical only included the referenced type by @hghianni in #1321
- APIMF-3026: Fix: Security scheme don't use global mediaType by @hghianni in #1322
- W-10547493: added test of conversion cycle with multiple operations w… by @looseale in #1323
- W-10736116: fix transformation for array with any type items by @looseale in #1324
- Fix test due model version change by @looseale in #1327
- Add release/* publish by @nschejtman in #1328
- Update typings by @nschejtman in #1331
- publish 5.0.5 rc.1 by @nschejtman in #1332
- Add graphql source spec at graphql document parser by @pope1838 in #1334
- Publish 5.0.5 by @looseale in #1335
- Release 5.0.5 by @looseale in #1336
Full Changelog: 5.0.4...5.0.5
Changes in 5.0.4
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
- APIMF-3680: Fix static initialization of wrappers to be done only one time
- APIMF-3666: Update SBT, sbt plugins and available libs
- APIMF-3649: Verify path normalization fix does not break js/windows functionality
- APIMF-3386: RAML 1.0 examples on trait duplicated by usages of trait
- APIMF-3606: Wrong lexical in complex API (Async2)
- APIMF-3603: Unhandled syaml exception in Parsing
GitHub issues fixed
Changes in 5.0.3
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
- APIMF-3213: Incorrect parsing of a RAML property ending with
?
- APIMF-3594: RAML 0.8 examples field has changed it's behavior
- APIMF-3503: Simple inheritance deletes examples field
- APIMF-3387: JSON schema of scalar type causes java.RuntimeException when defined with 'type' facet and used in response body
- APIMF-3302: Validation profile not being used in AMF 4 examples
- APIMF-3341: Custom domain property 'tags' disappears from the model
- APIMF-3592: WebApi platform interface does not have getter/setter for tags