@api-client/core 0.19.10 → 0.19.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -63
- package/bin/test.ts +1 -12
- package/build/src/browser.d.ts +3 -16
- package/build/src/browser.d.ts.map +1 -1
- package/build/src/browser.js +2 -17
- package/build/src/browser.js.map +1 -1
- package/build/src/events/EventTypes.d.ts +0 -6
- package/build/src/events/EventTypes.d.ts.map +1 -1
- package/build/src/events/EventTypes.js +0 -2
- package/build/src/events/EventTypes.js.map +1 -1
- package/build/src/events/Events.d.ts +0 -2
- package/build/src/events/Events.d.ts.map +1 -1
- package/build/src/events/Events.js +0 -2
- package/build/src/events/Events.js.map +1 -1
- package/build/src/index.d.ts +3 -16
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +2 -17
- package/build/src/index.js.map +1 -1
- package/build/src/modeling/ApiValidation.d.ts +26 -0
- package/build/src/modeling/ApiValidation.d.ts.map +1 -0
- package/build/src/modeling/ApiValidation.js +73 -0
- package/build/src/modeling/ApiValidation.js.map +1 -0
- package/build/src/modeling/Bindings.d.ts +3 -3
- package/build/src/modeling/Bindings.d.ts.map +1 -1
- package/build/src/modeling/Bindings.js.map +1 -1
- package/build/src/modeling/DomainAssociation.d.ts +5 -5
- package/build/src/modeling/DomainAssociation.d.ts.map +1 -1
- package/build/src/modeling/DomainAssociation.js.map +1 -1
- package/build/src/modeling/DomainEntity.d.ts +2 -3
- package/build/src/modeling/DomainEntity.d.ts.map +1 -1
- package/build/src/modeling/DomainEntity.js +1 -1
- package/build/src/modeling/DomainEntity.js.map +1 -1
- package/build/src/modeling/DomainProperty.d.ts +2 -3
- package/build/src/modeling/DomainProperty.d.ts.map +1 -1
- package/build/src/modeling/DomainProperty.js +1 -1
- package/build/src/modeling/DomainProperty.js.map +1 -1
- package/build/src/modeling/DomainValidation.d.ts +10 -4
- package/build/src/modeling/DomainValidation.d.ts.map +1 -1
- package/build/src/modeling/DomainValidation.js +55 -72
- package/build/src/modeling/DomainValidation.js.map +1 -1
- package/build/src/modeling/ai/types.d.ts +2 -2
- package/build/src/modeling/ai/types.d.ts.map +1 -1
- package/build/src/modeling/ai/types.js.map +1 -1
- package/build/src/{amf → modeling/amf}/DataValueGenerator.d.ts +1 -1
- package/build/src/modeling/amf/DataValueGenerator.d.ts.map +1 -0
- package/build/src/{amf → modeling/amf}/DataValueGenerator.js +2 -3
- package/build/src/modeling/amf/DataValueGenerator.js.map +1 -0
- package/build/src/modeling/amf/ShapeGenerator.d.ts +20 -20
- package/build/src/modeling/amf/ShapeGenerator.d.ts.map +1 -1
- package/build/src/modeling/amf/ShapeGenerator.js +16 -18
- package/build/src/modeling/amf/ShapeGenerator.js.map +1 -1
- package/build/src/modeling/amf/core_types.d.ts +9 -0
- package/build/src/modeling/amf/core_types.d.ts.map +1 -0
- package/build/src/modeling/amf/core_types.js +45 -0
- package/build/src/modeling/amf/core_types.js.map +1 -0
- package/build/src/modeling/validation/api_model_rules.d.ts +1 -2
- package/build/src/modeling/validation/api_model_rules.d.ts.map +1 -1
- package/build/src/modeling/validation/api_model_rules.js +0 -26
- package/build/src/modeling/validation/api_model_rules.js.map +1 -1
- package/build/src/modeling/validation/association_validation.d.ts +4 -4
- package/build/src/modeling/validation/association_validation.d.ts.map +1 -1
- package/build/src/modeling/validation/association_validation.js.map +1 -1
- package/build/src/modeling/validation/entity_validation.d.ts +6 -6
- package/build/src/modeling/validation/entity_validation.d.ts.map +1 -1
- package/build/src/modeling/validation/entity_validation.js.map +1 -1
- package/build/src/modeling/validation/property_validation.d.ts +3 -3
- package/build/src/modeling/validation/property_validation.d.ts.map +1 -1
- package/build/src/modeling/validation/property_validation.js.map +1 -1
- package/build/src/modeling/validation/rules.d.ts +2 -2
- package/build/src/modeling/validation/rules.d.ts.map +1 -1
- package/build/src/modeling/validation/rules.js.map +1 -1
- package/build/src/modeling/validation/semantic_validation.d.ts +2 -2
- package/build/src/modeling/validation/semantic_validation.d.ts.map +1 -1
- package/build/src/modeling/validation/semantic_validation.js.map +1 -1
- package/build/src/models/http-flows/LegacyTranslator.js +1 -1
- package/build/src/models/http-flows/LegacyTranslator.js.map +1 -1
- package/build/src/runtime/http-runner/HttpFlows.js +1 -1
- package/build/src/runtime/http-runner/HttpFlows.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.js +0 -1
- package/package.json +11 -14
- package/src/events/EventTypes.ts +0 -2
- package/src/events/Events.ts +0 -2
- package/src/modeling/ApiValidation.ts +86 -0
- package/src/modeling/Bindings.ts +3 -3
- package/src/modeling/DomainAssociation.ts +5 -5
- package/src/modeling/DomainEntity.ts +3 -4
- package/src/modeling/DomainProperty.ts +3 -4
- package/src/modeling/DomainValidation.ts +57 -74
- package/src/modeling/ai/types.ts +2 -2
- package/src/{amf → modeling/amf}/DataValueGenerator.ts +3 -4
- package/src/modeling/amf/ShapeGenerator.ts +45 -61
- package/src/modeling/amf/core_types.ts +47 -0
- package/src/modeling/validation/api_model_rules.ts +1 -31
- package/src/modeling/validation/association_validation.ts +6 -6
- package/src/modeling/validation/entity_validation.ts +11 -11
- package/src/modeling/validation/property_validation.ts +4 -4
- package/src/modeling/validation/rules.ts +6 -3
- package/src/modeling/validation/semantic_validation.ts +11 -11
- package/src/models/http-flows/LegacyTranslator.ts +1 -1
- package/src/runtime/http-runner/HttpFlows.ts +1 -1
- package/tests/unit/{amf → modeling/amf}/data_value_generator.spec.ts +2 -2
- package/tests/unit/modeling/amf/shape_generator.spec.ts +146 -167
- package/tests/unit/modeling/domain_asociation.spec.ts +13 -13
- package/tests/unit/modeling/domain_validation.spec.ts +7 -13
- package/tests/unit/modeling/validation/api_model_rules.spec.ts +11 -9
- package/tests/unit/runtime/runners/http_assertion_runner.spec.ts +1 -1
- package/tests/unit/runtime/runners/http_flow_runner.spec.ts +1 -1
- package/tests/unit/runtime/runners/project_runner.spec.ts +1 -1
- package/tests/unit/runtime/runners/request_runner.spec.ts +1 -1
- package/tests/unit/runtime/runners/serial_runner.spec.ts +1 -1
- package/build/src/amf/AmfMixin.d.ts +0 -396
- package/build/src/amf/AmfMixin.d.ts.map +0 -1
- package/build/src/amf/AmfMixin.js +0 -1138
- package/build/src/amf/AmfMixin.js.map +0 -1
- package/build/src/amf/AmfSerializer.d.ts +0 -137
- package/build/src/amf/AmfSerializer.d.ts.map +0 -1
- package/build/src/amf/AmfSerializer.js +0 -1947
- package/build/src/amf/AmfSerializer.js.map +0 -1
- package/build/src/amf/AmfTypes.d.ts +0 -25
- package/build/src/amf/AmfTypes.d.ts.map +0 -1
- package/build/src/amf/AmfTypes.js +0 -143
- package/build/src/amf/AmfTypes.js.map +0 -1
- package/build/src/amf/ApiExampleGenerator.d.ts +0 -40
- package/build/src/amf/ApiExampleGenerator.d.ts.map +0 -1
- package/build/src/amf/ApiExampleGenerator.js +0 -112
- package/build/src/amf/ApiExampleGenerator.js.map +0 -1
- package/build/src/amf/ApiMonacoSchemaGenerator.d.ts +0 -68
- package/build/src/amf/ApiMonacoSchemaGenerator.d.ts.map +0 -1
- package/build/src/amf/ApiMonacoSchemaGenerator.js +0 -248
- package/build/src/amf/ApiMonacoSchemaGenerator.js.map +0 -1
- package/build/src/amf/ApiSchemaGenerator.d.ts +0 -56
- package/build/src/amf/ApiSchemaGenerator.d.ts.map +0 -1
- package/build/src/amf/ApiSchemaGenerator.js +0 -94
- package/build/src/amf/ApiSchemaGenerator.js.map +0 -1
- package/build/src/amf/ApiSchemaValues.d.ts +0 -111
- package/build/src/amf/ApiSchemaValues.d.ts.map +0 -1
- package/build/src/amf/ApiSchemaValues.js +0 -463
- package/build/src/amf/ApiSchemaValues.js.map +0 -1
- package/build/src/amf/DataValueGenerator.d.ts.map +0 -1
- package/build/src/amf/DataValueGenerator.js.map +0 -1
- package/build/src/amf/Parsing.d.ts +0 -48
- package/build/src/amf/Parsing.d.ts.map +0 -1
- package/build/src/amf/Parsing.js +0 -2
- package/build/src/amf/Parsing.js.map +0 -1
- package/build/src/amf/Utils.d.ts +0 -37
- package/build/src/amf/Utils.d.ts.map +0 -1
- package/build/src/amf/Utils.js +0 -169
- package/build/src/amf/Utils.js.map +0 -1
- package/build/src/amf/data-node/DataNodeBase.d.ts +0 -34
- package/build/src/amf/data-node/DataNodeBase.d.ts.map +0 -1
- package/build/src/amf/data-node/DataNodeBase.js +0 -77
- package/build/src/amf/data-node/DataNodeBase.js.map +0 -1
- package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts +0 -15
- package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts.map +0 -1
- package/build/src/amf/data-node/JsonDataNodeGenerator.js +0 -23
- package/build/src/amf/data-node/JsonDataNodeGenerator.js.map +0 -1
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts +0 -14
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts.map +0 -1
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js +0 -48
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js.map +0 -1
- package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts +0 -22
- package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts.map +0 -1
- package/build/src/amf/data-node/XmlDataNodeGenerator.js +0 -34
- package/build/src/amf/data-node/XmlDataNodeGenerator.js.map +0 -1
- package/build/src/amf/definitions/Amf.d.ts +0 -363
- package/build/src/amf/definitions/Amf.d.ts.map +0 -1
- package/build/src/amf/definitions/Amf.js +0 -3
- package/build/src/amf/definitions/Amf.js.map +0 -1
- package/build/src/amf/definitions/Api.d.ts +0 -383
- package/build/src/amf/definitions/Api.d.ts.map +0 -1
- package/build/src/amf/definitions/Api.js +0 -2
- package/build/src/amf/definitions/Api.js.map +0 -1
- package/build/src/amf/definitions/Base.d.ts +0 -12
- package/build/src/amf/definitions/Base.d.ts.map +0 -1
- package/build/src/amf/definitions/Base.js +0 -2
- package/build/src/amf/definitions/Base.js.map +0 -1
- package/build/src/amf/definitions/Namespace.d.ts +0 -327
- package/build/src/amf/definitions/Namespace.d.ts.map +0 -1
- package/build/src/amf/definitions/Namespace.js +0 -346
- package/build/src/amf/definitions/Namespace.js.map +0 -1
- package/build/src/amf/definitions/Shapes.d.ts +0 -312
- package/build/src/amf/definitions/Shapes.d.ts.map +0 -1
- package/build/src/amf/definitions/Shapes.js +0 -87
- package/build/src/amf/definitions/Shapes.js.map +0 -1
- package/build/src/amf/models/AmfDataNode.d.ts +0 -67
- package/build/src/amf/models/AmfDataNode.d.ts.map +0 -1
- package/build/src/amf/models/AmfDataNode.js +0 -192
- package/build/src/amf/models/AmfDataNode.js.map +0 -1
- package/build/src/amf/shape/ShapeBase.d.ts +0 -74
- package/build/src/amf/shape/ShapeBase.d.ts.map +0 -1
- package/build/src/amf/shape/ShapeBase.js +0 -93
- package/build/src/amf/shape/ShapeBase.js.map +0 -1
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts +0 -47
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts.map +0 -1
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +0 -420
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +0 -1
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts +0 -85
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts.map +0 -1
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +0 -852
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +0 -1
- package/build/src/events/amf/AmfEventTypes.d.ts +0 -7
- package/build/src/events/amf/AmfEventTypes.d.ts.map +0 -1
- package/build/src/events/amf/AmfEventTypes.js +0 -7
- package/build/src/events/amf/AmfEventTypes.js.map +0 -1
- package/build/src/events/amf/AmfEvents.d.ts +0 -34
- package/build/src/events/amf/AmfEvents.d.ts.map +0 -1
- package/build/src/events/amf/AmfEvents.js +0 -63
- package/build/src/events/amf/AmfEvents.js.map +0 -1
- package/build/src/mocking/RandExp.d.ts +0 -55
- package/build/src/mocking/RandExp.d.ts.map +0 -1
- package/build/src/mocking/RandExp.js +0 -302
- package/build/src/mocking/RandExp.js.map +0 -1
- package/build/src/mocking/lib/ret.d.ts +0 -16
- package/build/src/mocking/lib/ret.d.ts.map +0 -1
- package/build/src/mocking/lib/ret.js +0 -284
- package/build/src/mocking/lib/ret.js.map +0 -1
- package/data/apis/APIC-187/APIC-187.raml +0 -21
- package/data/apis/APIC-187/dataType.raml +0 -132
- package/data/apis/APIC-187/example.raml +0 -84
- package/data/apis/APIC-188/APIC-188.raml +0 -21
- package/data/apis/APIC-188/dataType.raml +0 -132
- package/data/apis/APIC-188/example.raml +0 -84
- package/data/apis/APIC-233/APIC-233.raml +0 -15
- package/data/apis/APIC-391/APIC-391.raml +0 -44
- package/data/apis/APIC-391/examples/post-body-request-example.raml +0 -7
- package/data/apis/APIC-483/APIC-483.raml +0 -16
- package/data/apis/APIC-483/example/list-of-bank-succ.json +0 -32
- package/data/apis/APIC-483/schema/response-retrieve-list-bank.json +0 -68
- package/data/apis/APIC-487/APIC-487.raml +0 -36
- package/data/apis/APIC-655/APIC-655.raml +0 -44
- package/data/apis/APIC-655/delivery.json +0 -12
- package/data/apis/APIC-689/APIC-689.raml +0 -20
- package/data/apis/APIC-690/APIC-690.raml +0 -17
- package/data/apis/APIC-690/datatypes/Address.raml +0 -10
- package/data/apis/APIC-690/datatypes/Customer.raml +0 -17
- package/data/apis/APIC-690/examples/CustomerExample2.raml +0 -17
- package/data/apis/APIC-690/examples/CustomersExample.raml +0 -34
- package/data/apis/SE-10469/Purchase-Order-oagis-id-dd32f9c6c01048a19e15c423c9c741ae.json +0 -1383
- package/data/apis/SE-10469/SE-10469.raml +0 -11
- package/data/apis/SE-13092/Examples/PersonExample.raml +0 -7
- package/data/apis/SE-13092/SE-13092.raml +0 -37
- package/data/apis/SE-13092/datatypes/Address.raml +0 -5
- package/data/apis/SE-13092/datatypes/InlineType.raml +0 -5
- package/data/apis/SE-13092/datatypes/Person.raml +0 -15
- package/data/apis/SE-22063/SE-22063.raml +0 -14
- package/data/apis/SE-22063/stock.raml +0 -41
- package/data/apis/amf-helper-api/amf-helper-api.raml +0 -1024
- package/data/apis/amf-helper-api/examples/comment-example.json +0 -42
- package/data/apis/amf-helper-api/examples/commentCreateRequest-example.json +0 -7
- package/data/apis/amf-helper-api/examples/commentList-example.json +0 -48
- package/data/apis/amf-helper-api/examples/person.json +0 -14
- package/data/apis/amf-helper-api/examples/person.raml +0 -13
- package/data/apis/amf-helper-api/examples/person.xml +0 -14
- package/data/apis/amf-helper-api/libraries/comment-lib.raml +0 -143
- package/data/apis/amf-helper-api/library.raml +0 -7
- package/data/apis/amf-helper-api/schemas/person.json +0 -104
- package/data/apis/amf-helper-api/schemas/person.xsd +0 -26
- package/data/apis/amf-helper-api/traits/file.raml +0 -33
- package/data/apis/amf-helper-api/traits/pagination.raml +0 -80
- package/data/apis/amf-helper-api/traits/results.raml +0 -19
- package/data/apis/amf-helper-api/traits/visibility.raml +0 -14
- package/data/apis/amf-helper-api/types/app-person.raml +0 -101
- package/data/apis/amf-helper-api/types/dimensions.raml +0 -24
- package/data/apis/amf-helper-api/types/external-type.raml +0 -7
- package/data/apis/amf-helper-api/types/image.raml +0 -23
- package/data/apis/amf-helper-api/types/product.raml +0 -52
- package/data/apis/amf-helper-api/types/resource.raml +0 -11
- package/data/apis/amf-helper-api/types/standard-request.raml +0 -50
- package/data/apis/amf-helper-api/types/user.raml +0 -37
- package/data/apis/arc-demo-api/arc-demo-api.raml +0 -468
- package/data/apis/arc-demo-api/examples/e400.xml +0 -4
- package/data/apis/arc-demo-api/examples/e401.xml +0 -4
- package/data/apis/arc-demo-api/examples/e404.xml +0 -4
- package/data/apis/arc-demo-api/examples/image.xml +0 -5
- package/data/apis/arc-demo-api/examples/messages-example.json +0 -22
- package/data/apis/arc-demo-api/examples/messages-sent-example.json +0 -15
- package/data/apis/arc-demo-api/examples/person.json +0 -14
- package/data/apis/arc-demo-api/examples/person.url.encoded +0 -1
- package/data/apis/arc-demo-api/examples/person.xml +0 -14
- package/data/apis/arc-demo-api/examples/product.xml +0 -9
- package/data/apis/arc-demo-api/library.raml +0 -36
- package/data/apis/arc-demo-api/resourceTypes/app-person.raml +0 -49
- package/data/apis/arc-demo-api/resourceTypes/example-types.raml +0 -45
- package/data/apis/arc-demo-api/resourceTypes/image.raml +0 -23
- package/data/apis/arc-demo-api/resourceTypes/message-sent-type.raml +0 -23
- package/data/apis/arc-demo-api/resourceTypes/message-type.raml +0 -33
- package/data/apis/arc-demo-api/resourceTypes/product.raml +0 -52
- package/data/apis/arc-demo-api/resourceTypes/resource.raml +0 -11
- package/data/apis/arc-demo-api/schemas/error-response.xsd +0 -11
- package/data/apis/arc-demo-api/schemas/image.xsd +0 -11
- package/data/apis/arc-demo-api/schemas/person.json +0 -104
- package/data/apis/arc-demo-api/schemas/person.xsd +0 -26
- package/data/apis/arc-demo-api/schemas/product.xsd +0 -17
- package/data/apis/arc-demo-api/securitySchemes/basic.raml +0 -5
- package/data/apis/arc-demo-api/securitySchemes/oauth_2_0.raml +0 -29
- package/data/apis/arc-demo-api/securitySchemes/x-custom.raml +0 -26
- package/data/apis/arc-demo-api/traits/adminable.raml +0 -23
- package/data/apis/arc-demo-api/traits/pagination.raml +0 -83
- package/data/apis/arc-demo-api/traits/rate-limited.raml +0 -9
- package/data/apis/async-api/async-api.yaml +0 -96
- package/data/apis/example-generator-api/contact-email-example.raml +0 -6
- package/data/apis/example-generator-api/contact-example.raml +0 -5
- package/data/apis/example-generator-api/contact-fax-example.raml +0 -5
- package/data/apis/example-generator-api/contact-website-example.raml +0 -2
- package/data/apis/example-generator-api/example-1.raml +0 -6
- package/data/apis/example-generator-api/example-2.raml +0 -9
- package/data/apis/example-generator-api/example-3.raml +0 -4
- package/data/apis/example-generator-api/example-4.raml +0 -2
- package/data/apis/example-generator-api/example-5.raml +0 -4
- package/data/apis/example-generator-api/example-6.raml +0 -2
- package/data/apis/example-generator-api/example-7.raml +0 -5
- package/data/apis/example-generator-api/example-generator-api.raml +0 -423
- package/data/apis/example-generator-api/example.json +0 -14
- package/data/apis/example-generator-api/example.xml +0 -15
- package/data/apis/example-generator-api/example.xsd +0 -26
- package/data/apis/example-generator-api/examples/employee.raml +0 -7
- package/data/apis/example-generator-api/examples/employees.raml +0 -7
- package/data/apis/example-generator-api/linked-named-example.raml +0 -21
- package/data/apis/example-generator-api/named-example-with-link.raml +0 -5
- package/data/apis/example-generator-api/named-example.raml +0 -9
- package/data/apis/example-generator-api/user-json-example.raml +0 -17
- package/data/apis/example-generator-api/user-raml-example.raml +0 -37
- package/data/apis/example-generator-api/user.json +0 -8
- package/data/apis/example-generator-api/user.raml +0 -18
- package/data/apis/example-generator-api/users-json-example.raml +0 -17
- package/data/apis/example-generator-api/users-raml-example.raml +0 -32
- package/data/apis/example-generator-api/users.json +0 -8
- package/data/apis/expanded-api/expanded-api.raml +0 -8
- package/data/apis/flattened-api/flattened-api.raml +0 -8
- package/data/apis/multiple-servers/multiple-servers.yaml +0 -112
- package/data/apis/oas-3-api/oas-3-api.yaml +0 -356
- package/data/apis/oas-date/oas-date.yaml +0 -28
- package/data/apis/oas-types/oas-types.yaml +0 -159
- package/data/apis/oas-unions/oas-unions.yaml +0 -75
- package/data/apis/petstore/petstore.yaml +0 -954
- package/data/apis/raml-date/raml-date.raml +0 -28
- package/data/apis/recursive/recursive.raml +0 -14
- package/data/apis/schema-api/examples/person.json +0 -14
- package/data/apis/schema-api/examples/person.raml +0 -14
- package/data/apis/schema-api/examples/person.url.encoded +0 -1
- package/data/apis/schema-api/examples/person.xml +0 -14
- package/data/apis/schema-api/library/demo-types.raml +0 -43
- package/data/apis/schema-api/schema-api.raml +0 -656
- package/data/apis/schema-api/schemas/person.json +0 -104
- package/data/apis/schema-api/schemas/person.xsd +0 -26
- package/data/apis/schema-api/types/DemoPerson.raml +0 -67
- package/data/apis/secured-api/oauth-2-custom-settings.raml +0 -143
- package/data/apis/secured-api/oauth2-header-delivery.raml +0 -13
- package/data/apis/secured-api/oauth2-no-delivery.raml +0 -8
- package/data/apis/secured-api/oauth2-no-grants.raml +0 -12
- package/data/apis/secured-api/oauth2-pkce.raml +0 -13
- package/data/apis/secured-api/oauth2-query-delivery.raml +0 -13
- package/data/apis/secured-api/oauth_1_0.raml +0 -8
- package/data/apis/secured-api/oauth_1_0_no-settings.raml +0 -3
- package/data/apis/secured-api/oauth_1_0_no-signature.raml +0 -7
- package/data/apis/secured-api/oauth_1_0_signature.raml +0 -8
- package/data/apis/secured-api/passthrough-querystring.raml +0 -16
- package/data/apis/secured-api/passthrough.raml +0 -24
- package/data/apis/secured-api/secured-api.raml +0 -231
- package/data/apis/secured-api/x-custom.raml +0 -33
- package/data/apis/secured-api/x-other.raml +0 -29
- package/data/apis/secured-api/x-query-string.raml +0 -16
- package/data/apis/tracked-examples/datatypes/employee.raml +0 -5
- package/data/apis/tracked-examples/examples/employee.raml +0 -4
- package/data/apis/tracked-examples/examples/employees.raml +0 -8
- package/data/apis/tracked-examples/tracked-to-linked.raml +0 -28
- package/data/model.js +0 -129
- package/data/models/APIC-187.json +0 -11416
- package/data/models/APIC-188.json +0 -11416
- package/data/models/APIC-233.json +0 -539
- package/data/models/APIC-391.json +0 -1903
- package/data/models/APIC-483.json +0 -3110
- package/data/models/APIC-487.json +0 -1225
- package/data/models/APIC-655.json +0 -3145
- package/data/models/APIC-689.json +0 -797
- package/data/models/APIC-690.json +0 -5992
- package/data/models/SE-10469.json +0 -22898
- package/data/models/SE-13092.json +0 -2769
- package/data/models/SE-22063.json +0 -2314
- package/data/models/amf-helper-api.json +0 -84457
- package/data/models/arc-demo-api.json +0 -52041
- package/data/models/async-api.json +0 -3227
- package/data/models/example-generator-api.json +0 -45209
- package/data/models/expanded-api.json +0 -251
- package/data/models/flattened-api.json +0 -251
- package/data/models/multiple-servers.json +0 -2769
- package/data/models/oas-3-api.json +0 -10590
- package/data/models/oas-date.json +0 -637
- package/data/models/oas-types.json +0 -5352
- package/data/models/oas-unions.json +0 -1935
- package/data/models/petstore.json +0 -27712
- package/data/models/raml-date.json +0 -1114
- package/data/models/recursive.json +0 -610
- package/data/models/schema-api.json +0 -35527
- package/data/models/secured-api.json +0 -21071
- package/data/models/tracked-to-linked.json +0 -1914
- package/src/amf/AmfMixin.ts +0 -1726
- package/src/amf/AmfSerializer.ts +0 -2358
- package/src/amf/AmfTypes.ts +0 -147
- package/src/amf/ApiExampleGenerator.ts +0 -122
- package/src/amf/ApiMonacoSchemaGenerator.ts +0 -332
- package/src/amf/ApiSchemaGenerator.ts +0 -115
- package/src/amf/ApiSchemaValues.ts +0 -509
- package/src/amf/Parsing.ts +0 -50
- package/src/amf/Utils.ts +0 -172
- package/src/amf/data-node/DataNodeBase.ts +0 -83
- package/src/amf/data-node/JsonDataNodeGenerator.ts +0 -24
- package/src/amf/data-node/README.md +0 -3
- package/src/amf/data-node/UrlEncodedDataNodeGenerator.ts +0 -49
- package/src/amf/data-node/XmlDataNodeGenerator.ts +0 -46
- package/src/amf/definitions/Amf.ts +0 -440
- package/src/amf/definitions/Api.ts +0 -445
- package/src/amf/definitions/Base.ts +0 -13
- package/src/amf/definitions/Namespace.ts +0 -357
- package/src/amf/definitions/Shapes.ts +0 -438
- package/src/amf/models/AmfDataNode.ts +0 -210
- package/src/amf/shape/README.md +0 -4
- package/src/amf/shape/ShapeBase.ts +0 -174
- package/src/amf/shape/ShapeJsonSchemaGenerator.ts +0 -457
- package/src/amf/shape/ShapeXmlSchemaGenerator.ts +0 -933
- package/src/events/amf/AmfEventTypes.ts +0 -6
- package/src/events/amf/AmfEvents.ts +0 -78
- package/src/mocking/RandExp.ts +0 -335
- package/src/mocking/lib/ret.ts +0 -279
- package/tests/unit/amf/APIC-187.spec.ts +0 -41
- package/tests/unit/amf/APIC-188.spec.ts +0 -30
- package/tests/unit/amf/APIC-233.spec.ts +0 -32
- package/tests/unit/amf/APIC-391.spec.ts +0 -39
- package/tests/unit/amf/APIC-487.spec.ts +0 -44
- package/tests/unit/amf/APIC-655.spec.ts +0 -41
- package/tests/unit/amf/APIC-689.spec.ts +0 -28
- package/tests/unit/amf/APIC-690.spec.ts +0 -93
- package/tests/unit/amf/AmfLoader.ts +0 -538
- package/tests/unit/amf/AmfMixin.spec.ts +0 -1707
- package/tests/unit/amf/ApiExampleGenerator.spec.ts +0 -250
- package/tests/unit/amf/ApiMonacoSchemaGenerator.spec.ts +0 -183
- package/tests/unit/amf/ApiSchemaValues.spec.ts +0 -602
- package/tests/unit/amf/Namepsace.spec.ts +0 -494
- package/tests/unit/amf/SE-10469.spec.ts +0 -35
- package/tests/unit/amf/SE-13092.spec.ts +0 -64
- package/tests/unit/amf/SE-22063.spec.ts +0 -45
- package/tests/unit/amf/raml-examples.spec.ts +0 -43
- package/tests/unit/amf/schema_gen_array.spec.ts +0 -199
- package/tests/unit/amf/schema_gen_oas.spec.ts +0 -140
- package/tests/unit/amf/schema_gen_object.spec.ts +0 -279
- package/tests/unit/amf/schema_gen_scalar.spec.ts +0 -143
- package/tests/unit/amf/schema_gen_union.spec.ts +0 -401
- package/tests/unit/amf/schema_gen_unknown.spec.ts +0 -42
- package/tests/unit/amf/schema_gen_xml.spec.ts +0 -726
- package/tests/unit/amf/serializer/APIC-483.spec.ts +0 -36
- package/tests/unit/amf/serializer/Anotations.spec.ts +0 -50
- package/tests/unit/amf/serializer/Api.spec.ts +0 -210
- package/tests/unit/amf/serializer/Documentation.spec.ts +0 -52
- package/tests/unit/amf/serializer/Endpoints.spec.ts +0 -172
- package/tests/unit/amf/serializer/Operations.spec.ts +0 -330
- package/tests/unit/amf/serializer/Parameters.spec.ts +0 -149
- package/tests/unit/amf/serializer/PayloadExamples.spec.ts +0 -152
- package/tests/unit/amf/serializer/Security.spec.ts +0 -626
- package/tests/unit/amf/serializer/Server.spec.ts +0 -78
- package/tests/unit/amf/serializer/Shapes.spec.ts +0 -304
- package/tests/unit/amf/serializer/SourceMaps.spec.ts +0 -52
- package/tests/unit/amf/shapes/ShapeXmlSchemaGenerator.spec.ts +0 -28
- package/tests/unit/amf/tracked-to-linked.spec.ts +0 -90
- package/tests/unit/amf/xml-data-processing.spec.ts +0 -217
- package/tests/unit/events/amf.spec.ts +0 -151
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
import { test } from '@japa/runner'
|
|
2
|
-
import {
|
|
3
|
-
IApiArrayShape,
|
|
4
|
-
IApiDataExample,
|
|
5
|
-
IApiFileShape,
|
|
6
|
-
IApiNodeShape,
|
|
7
|
-
IApiScalarNode,
|
|
8
|
-
IApiScalarShape,
|
|
9
|
-
IApiUnionShape,
|
|
10
|
-
IApiXmlSerializer,
|
|
11
|
-
IShapeUnion,
|
|
12
|
-
} from '../../../../src/amf/definitions/Shapes.js'
|
|
13
|
-
import {
|
|
14
|
-
IAmfAnyTypes,
|
|
15
|
-
IAmfArrayTypes,
|
|
16
|
-
IAmfExampleTypes,
|
|
17
|
-
IAmfFileTypes,
|
|
18
|
-
IAmfNodeTypes,
|
|
19
|
-
IAmfPropertyTypes,
|
|
20
|
-
IAmfScalarTypes,
|
|
21
|
-
IAmfUnionTypes,
|
|
22
|
-
} from '../../../../src/amf/AmfTypes.js'
|
|
23
|
-
import { AmfNamespace } from '../../../../src/amf/definitions/Namespace.js'
|
|
2
|
+
import { Shapes, AmfTypes, AmfNamespace } from '@api-client/amf-core'
|
|
24
3
|
import { ShapeGenerator } from '../../../../src/modeling/amf/ShapeGenerator.js'
|
|
25
4
|
import {
|
|
26
5
|
type PropertyWebBindings,
|
|
@@ -43,10 +22,10 @@ test.group('entity()', (group) => {
|
|
|
43
22
|
})
|
|
44
23
|
|
|
45
24
|
test('returns the basic shape', ({ assert }) => {
|
|
46
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
25
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
47
26
|
|
|
48
27
|
assert.equal(result.id, e1.key, 'has the id')
|
|
49
|
-
assert.deepEqual(result.types, IAmfNodeTypes, 'has the types')
|
|
28
|
+
assert.deepEqual(result.types, AmfTypes.IAmfNodeTypes, 'has the types')
|
|
50
29
|
assert.deepEqual(result.values, [], 'has the values')
|
|
51
30
|
assert.deepEqual(result.inherits, [], 'has the inherits')
|
|
52
31
|
assert.deepEqual(result.or, [], 'has the or')
|
|
@@ -60,35 +39,35 @@ test.group('entity()', (group) => {
|
|
|
60
39
|
|
|
61
40
|
test('returns the display name', ({ assert }) => {
|
|
62
41
|
e1.info.displayName = 'e 1 name'
|
|
63
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
42
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
64
43
|
|
|
65
44
|
assert.equal(result.displayName, 'e 1 name')
|
|
66
45
|
})
|
|
67
46
|
|
|
68
47
|
test('returns the description', ({ assert }) => {
|
|
69
48
|
e1.info.description = 'e 1 description'
|
|
70
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
49
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
71
50
|
|
|
72
51
|
assert.equal(result.description, 'e 1 description')
|
|
73
52
|
})
|
|
74
53
|
|
|
75
54
|
test('returns the deprecated', ({ assert }) => {
|
|
76
55
|
e1.deprecated = true
|
|
77
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
56
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
78
57
|
|
|
79
58
|
assert.isTrue(result.deprecated)
|
|
80
59
|
})
|
|
81
60
|
|
|
82
61
|
test('returns empty properties', ({ assert }) => {
|
|
83
62
|
e1.info.description = 'e 1 description'
|
|
84
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
63
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
85
64
|
|
|
86
65
|
assert.deepEqual(result.properties, [])
|
|
87
66
|
})
|
|
88
67
|
|
|
89
68
|
test('returns defined properties', ({ assert }) => {
|
|
90
69
|
e1.addProperty({ key: 'test', info: { name: 'test' } })
|
|
91
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
70
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
92
71
|
|
|
93
72
|
assert.lengthOf(result.properties, 1)
|
|
94
73
|
})
|
|
@@ -96,7 +75,7 @@ test.group('entity()', (group) => {
|
|
|
96
75
|
test('adds associations to the properties', ({ assert }) => {
|
|
97
76
|
e1.addProperty({ key: 'test', info: { name: 'test' } })
|
|
98
77
|
e1.addAssociation({ info: { name: 'test association' } })
|
|
99
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
78
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
100
79
|
|
|
101
80
|
assert.lengthOf(result.properties, 2)
|
|
102
81
|
assert.equal(result.properties[1].name, 'test association')
|
|
@@ -105,7 +84,7 @@ test.group('entity()', (group) => {
|
|
|
105
84
|
test('adds parents to the inherits', ({ assert }) => {
|
|
106
85
|
const e2 = m1.addEntity({ key: 'e2', info: { name: 'e2' } })
|
|
107
86
|
e1.addParent(e2.key)
|
|
108
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
87
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
109
88
|
|
|
110
89
|
assert.lengthOf(result.inherits, 1)
|
|
111
90
|
assert.equal(result.inherits[0].name, 'e2')
|
|
@@ -128,7 +107,7 @@ test.group('property() / just data model', (group) => {
|
|
|
128
107
|
test('returns the basic shape', ({ assert }) => {
|
|
129
108
|
const result = p1.toApiShape()
|
|
130
109
|
assert.equal(result.id, p1.key, 'has the id')
|
|
131
|
-
assert.deepEqual(result.types, IAmfPropertyTypes, 'has the types')
|
|
110
|
+
assert.deepEqual(result.types, AmfTypes.IAmfPropertyTypes, 'has the types')
|
|
132
111
|
assert.deepEqual(result.values, [], 'has the values')
|
|
133
112
|
assert.deepEqual(result.inherits, [], 'has the inherits')
|
|
134
113
|
assert.deepEqual(result.or, [], 'has the or')
|
|
@@ -149,11 +128,11 @@ test.group('property() / just data model', (group) => {
|
|
|
149
128
|
p1.info.displayName = 'string dn'
|
|
150
129
|
p1.info.description = 'string desc'
|
|
151
130
|
const result = p1.toApiShape()
|
|
152
|
-
const range = result.range as IApiScalarShape
|
|
131
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
153
132
|
|
|
154
133
|
assert.typeOf(range, 'object', 'has the range')
|
|
155
134
|
assert.equal(range.id, `scalar-shape-${p1.key}`, 'has the id')
|
|
156
|
-
assert.deepEqual(range.types, IAmfScalarTypes, 'has the types')
|
|
135
|
+
assert.deepEqual(range.types, AmfTypes.IAmfScalarTypes, 'has the types')
|
|
157
136
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.string, 'has the dataType')
|
|
158
137
|
assert.equal(range.name, 'p1', 'has the name')
|
|
159
138
|
assert.equal(range.displayName, 'string dn', 'has the displayName')
|
|
@@ -163,7 +142,7 @@ test.group('property() / just data model', (group) => {
|
|
|
163
142
|
test('handles examples', ({ assert }) => {
|
|
164
143
|
p1.schema = { examples: ['example1', 'example2'] }
|
|
165
144
|
const result = p1.toApiShape()
|
|
166
|
-
const range = result.range as IApiScalarShape
|
|
145
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
167
146
|
assert.lengthOf(range.examples, 2)
|
|
168
147
|
assert.property(range.examples[0], 'structuredValue')
|
|
169
148
|
assert.property(range.examples[1], 'structuredValue')
|
|
@@ -172,7 +151,7 @@ test.group('property() / just data model', (group) => {
|
|
|
172
151
|
test('handles defaultValue', ({ assert }) => {
|
|
173
152
|
p1.schema = { defaultValue: { value: 'defaultValue', type: 'literal' } }
|
|
174
153
|
const result = p1.toApiShape()
|
|
175
|
-
const range = result.range as IApiScalarShape
|
|
154
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
176
155
|
assert.property(range, 'defaultValue')
|
|
177
156
|
assert.containsSubset(range.defaultValue, {
|
|
178
157
|
value: 'defaultValue',
|
|
@@ -182,7 +161,7 @@ test.group('property() / just data model', (group) => {
|
|
|
182
161
|
test('handles enum', ({ assert }) => {
|
|
183
162
|
p1.schema = { enum: ['enum1', 'enum2'] }
|
|
184
163
|
const result = p1.toApiShape()
|
|
185
|
-
const range = result.range as IApiScalarShape
|
|
164
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
186
165
|
assert.lengthOf(range.values, 2)
|
|
187
166
|
assert.containsSubset(range.values[0], {
|
|
188
167
|
dataType: AmfNamespace.w3.xmlSchema.string,
|
|
@@ -197,7 +176,7 @@ test.group('property() / just data model', (group) => {
|
|
|
197
176
|
test('has the default range for a number', ({ assert }) => {
|
|
198
177
|
p1.type = 'number'
|
|
199
178
|
const result = p1.toApiShape()
|
|
200
|
-
const range = result.range as IApiScalarShape
|
|
179
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
201
180
|
|
|
202
181
|
assert.typeOf(range, 'object', 'has the range')
|
|
203
182
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.number, 'has the dataType')
|
|
@@ -220,7 +199,7 @@ test.group('property() / just data model', (group) => {
|
|
|
220
199
|
test('handles multiple properties', ({ assert }) => {
|
|
221
200
|
p1.multiple = true
|
|
222
201
|
const result = p1.toApiShape()
|
|
223
|
-
const range = result.range as IApiArrayShape
|
|
202
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
224
203
|
assert.property(range, 'items')
|
|
225
204
|
})
|
|
226
205
|
|
|
@@ -229,7 +208,7 @@ test.group('property() / just data model', (group) => {
|
|
|
229
208
|
const bindings = p1.getWebBinding() as PropertyWebBindings
|
|
230
209
|
bindings.format = 'base64'
|
|
231
210
|
const result = p1.toApiShape()
|
|
232
|
-
const range = result.range as IApiFileShape
|
|
211
|
+
const range = result.range as Shapes.IApiFileShape
|
|
233
212
|
assert.equal(range.format, AmfNamespace.w3.xmlSchema.base64Binary)
|
|
234
213
|
})
|
|
235
214
|
|
|
@@ -238,7 +217,7 @@ test.group('property() / just data model', (group) => {
|
|
|
238
217
|
const bindings = p1.getWebBinding()
|
|
239
218
|
bindings.format = 'int32'
|
|
240
219
|
const result = p1.toApiShape()
|
|
241
|
-
const range = result.range as IApiScalarShape
|
|
220
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
242
221
|
|
|
243
222
|
assert.typeOf(range, 'object', 'has the range')
|
|
244
223
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.integer, 'has the dataType')
|
|
@@ -249,7 +228,7 @@ test.group('property() / just data model', (group) => {
|
|
|
249
228
|
const bindings = p1.getWebBinding()
|
|
250
229
|
bindings.format = 'int64'
|
|
251
230
|
const result = p1.toApiShape()
|
|
252
|
-
const range = result.range as IApiScalarShape
|
|
231
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
253
232
|
|
|
254
233
|
assert.typeOf(range, 'object', 'has the range')
|
|
255
234
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.integer, 'has the dataType')
|
|
@@ -258,7 +237,7 @@ test.group('property() / just data model', (group) => {
|
|
|
258
237
|
test('has the default range for a date', ({ assert }) => {
|
|
259
238
|
p1.type = 'date'
|
|
260
239
|
const result = p1.toApiShape()
|
|
261
|
-
const range = result.range as IApiScalarShape
|
|
240
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
262
241
|
|
|
263
242
|
assert.typeOf(range, 'object', 'has the range')
|
|
264
243
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.date, 'has the dataType')
|
|
@@ -267,7 +246,7 @@ test.group('property() / just data model', (group) => {
|
|
|
267
246
|
test('has the default range for a datetime', ({ assert }) => {
|
|
268
247
|
p1.type = 'datetime'
|
|
269
248
|
const result = p1.toApiShape()
|
|
270
|
-
const range = result.range as IApiScalarShape
|
|
249
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
271
250
|
|
|
272
251
|
assert.typeOf(range, 'object', 'has the range')
|
|
273
252
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.dateTime, 'has the dataType')
|
|
@@ -276,7 +255,7 @@ test.group('property() / just data model', (group) => {
|
|
|
276
255
|
test('has the default range for a time', ({ assert }) => {
|
|
277
256
|
p1.type = 'time'
|
|
278
257
|
const result = p1.toApiShape()
|
|
279
|
-
const range = result.range as IApiScalarShape
|
|
258
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
280
259
|
|
|
281
260
|
assert.typeOf(range, 'object', 'has the range')
|
|
282
261
|
assert.equal(range.dataType, AmfNamespace.aml.vocabularies.shapes.dateTimeOnly, 'has the dataType')
|
|
@@ -285,7 +264,7 @@ test.group('property() / just data model', (group) => {
|
|
|
285
264
|
// test('has the default range for a nil', ({ assert }) => {
|
|
286
265
|
// p1.type = 'nil'
|
|
287
266
|
// const result = p1.toApiShape()
|
|
288
|
-
// const range = result.range as IApiScalarShape
|
|
267
|
+
// const range = result.range as Shapes.IApiScalarShape
|
|
289
268
|
|
|
290
269
|
// assert.typeOf(range, 'object', 'has the range')
|
|
291
270
|
// assert.equal(range.dataType, AmfNamespace.aml.vocabularies.shapes.nil, 'has the dataType')
|
|
@@ -294,7 +273,7 @@ test.group('property() / just data model', (group) => {
|
|
|
294
273
|
test('has the default range for a boolean', ({ assert }) => {
|
|
295
274
|
p1.type = 'boolean'
|
|
296
275
|
const result = p1.toApiShape()
|
|
297
|
-
const range = result.range as IApiScalarShape
|
|
276
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
298
277
|
|
|
299
278
|
assert.typeOf(range, 'object', 'has the range')
|
|
300
279
|
assert.equal(range.dataType, AmfNamespace.aml.vocabularies.shapes.boolean, 'has the dataType')
|
|
@@ -303,7 +282,7 @@ test.group('property() / just data model', (group) => {
|
|
|
303
282
|
// test('has the default range for an any', ({ assert }) => {
|
|
304
283
|
// p1.type = 'any'
|
|
305
284
|
// const result = p1.toApiShape()
|
|
306
|
-
// const range = result.range as IApiScalarShape
|
|
285
|
+
// const range = result.range as Shapes.IApiScalarShape
|
|
307
286
|
|
|
308
287
|
// assert.typeOf(range, 'object', 'has the range')
|
|
309
288
|
// assert.equal(range.dataType, AmfNamespace.aml.vocabularies.shapes.AnyShape, 'has the dataType')
|
|
@@ -314,11 +293,11 @@ test.group('property() / just data model', (group) => {
|
|
|
314
293
|
p1.info.displayName = 'string dn'
|
|
315
294
|
p1.info.description = 'string desc'
|
|
316
295
|
const result = p1.toApiShape()
|
|
317
|
-
const range = result.range as IApiFileShape
|
|
296
|
+
const range = result.range as Shapes.IApiFileShape
|
|
318
297
|
|
|
319
298
|
assert.typeOf(range, 'object', 'has the range')
|
|
320
299
|
assert.equal(range.id, `file-shape-${p1.key}`, 'has the id')
|
|
321
|
-
assert.deepEqual(range.types, IAmfFileTypes, 'has the types')
|
|
300
|
+
assert.deepEqual(range.types, AmfTypes.IAmfFileTypes, 'has the types')
|
|
322
301
|
assert.equal(range.name, 'p1', 'has the name')
|
|
323
302
|
assert.equal(range.displayName, 'string dn', 'has the displayName')
|
|
324
303
|
assert.equal(range.description, 'string desc', 'has the description')
|
|
@@ -329,17 +308,17 @@ test.group('property() / just data model', (group) => {
|
|
|
329
308
|
p1.info.displayName = 'string dn'
|
|
330
309
|
p1.info.description = 'string desc'
|
|
331
310
|
const result = p1.toApiShape()
|
|
332
|
-
const range = result.range as IApiArrayShape
|
|
311
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
333
312
|
|
|
334
313
|
assert.typeOf(range, 'object', 'has the range')
|
|
335
314
|
assert.equal(range.id, `array-shape-${p1.key}`, 'has the id')
|
|
336
|
-
assert.deepEqual(range.types, IAmfArrayTypes, 'has the types')
|
|
315
|
+
assert.deepEqual(range.types, AmfTypes.IAmfArrayTypes, 'has the types')
|
|
337
316
|
|
|
338
|
-
const items = range.items as IApiScalarShape
|
|
317
|
+
const items = range.items as Shapes.IApiScalarShape
|
|
339
318
|
|
|
340
319
|
assert.typeOf(items, 'object', 'has the items')
|
|
341
320
|
assert.equal(items.id, `scalar-shape-${p1.key}`, 'has the id')
|
|
342
|
-
assert.deepEqual(items.types, IAmfScalarTypes, 'has the types')
|
|
321
|
+
assert.deepEqual(items.types, AmfTypes.IAmfScalarTypes, 'has the types')
|
|
343
322
|
|
|
344
323
|
assert.equal(items.name, 'p1', 'has the name')
|
|
345
324
|
assert.equal(items.displayName, 'string dn', 'has the displayName')
|
|
@@ -352,17 +331,17 @@ test.group('property() / just data model', (group) => {
|
|
|
352
331
|
p1.info.displayName = 'string dn'
|
|
353
332
|
p1.info.description = 'string desc'
|
|
354
333
|
const result = p1.toApiShape()
|
|
355
|
-
const range = result.range as IApiArrayShape
|
|
334
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
356
335
|
|
|
357
336
|
assert.typeOf(range, 'object', 'has the range')
|
|
358
337
|
assert.equal(range.id, `array-shape-${p1.key}`, 'has the id')
|
|
359
|
-
assert.deepEqual(range.types, IAmfArrayTypes, 'has the types')
|
|
338
|
+
assert.deepEqual(range.types, AmfTypes.IAmfArrayTypes, 'has the types')
|
|
360
339
|
|
|
361
|
-
const items = range.items as IApiFileShape
|
|
340
|
+
const items = range.items as Shapes.IApiFileShape
|
|
362
341
|
|
|
363
342
|
assert.typeOf(items, 'object', 'has the items')
|
|
364
343
|
assert.equal(items.id, `file-shape-${p1.key}`, 'has the id')
|
|
365
|
-
assert.deepEqual(items.types, IAmfFileTypes, 'has the types')
|
|
344
|
+
assert.deepEqual(items.types, AmfTypes.IAmfFileTypes, 'has the types')
|
|
366
345
|
|
|
367
346
|
assert.equal(items.name, 'p1', 'has the name')
|
|
368
347
|
assert.equal(items.displayName, 'string dn', 'has the displayName')
|
|
@@ -392,7 +371,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
392
371
|
},
|
|
393
372
|
]
|
|
394
373
|
const result = p1.toApiShape()
|
|
395
|
-
const string = result.range as IApiScalarShape
|
|
374
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
396
375
|
|
|
397
376
|
assert.equal(string.name, 'other', 'the range has the changed name')
|
|
398
377
|
assert.equal(result.name, 'other', 'the property has the changed name')
|
|
@@ -409,13 +388,13 @@ test.group('property() / with web bindings', (group) => {
|
|
|
409
388
|
// },
|
|
410
389
|
// ]
|
|
411
390
|
// const result = p1.toApiShape()
|
|
412
|
-
// const string = result.range as IApiScalarShape
|
|
391
|
+
// const string = result.range as Shapes.IApiScalarShape
|
|
413
392
|
// assert.equal(string.dataType, AmfNamespace.w3.xmlSchema.date)
|
|
414
393
|
// })
|
|
415
394
|
|
|
416
395
|
test('sets the xml serialization', ({ assert }) => {
|
|
417
396
|
const p1 = e1.addProperty({ key: 'p1', type: 'string', info: { name: 'p1' } })
|
|
418
|
-
const value: IApiXmlSerializer = {
|
|
397
|
+
const value: Shapes.IApiXmlSerializer = {
|
|
419
398
|
id: '',
|
|
420
399
|
types: [],
|
|
421
400
|
customDomainProperties: [],
|
|
@@ -430,7 +409,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
430
409
|
},
|
|
431
410
|
]
|
|
432
411
|
const result = p1.toApiShape()
|
|
433
|
-
const string = result.range as IApiScalarShape
|
|
412
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
434
413
|
assert.deepEqual(string.xmlSerialization, value)
|
|
435
414
|
})
|
|
436
415
|
|
|
@@ -446,7 +425,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
446
425
|
},
|
|
447
426
|
]
|
|
448
427
|
const result = p1.toApiShape()
|
|
449
|
-
const file = result.range as IApiFileShape
|
|
428
|
+
const file = result.range as Shapes.IApiFileShape
|
|
450
429
|
assert.deepEqual(file.fileTypes, value)
|
|
451
430
|
})
|
|
452
431
|
|
|
@@ -456,7 +435,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
456
435
|
pattern: 'a-z',
|
|
457
436
|
}
|
|
458
437
|
const result = p1.toApiShape()
|
|
459
|
-
const string = result.range as IApiScalarShape
|
|
438
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
460
439
|
assert.equal(string.pattern, 'a-z')
|
|
461
440
|
})
|
|
462
441
|
|
|
@@ -466,7 +445,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
466
445
|
minimum: 1,
|
|
467
446
|
}
|
|
468
447
|
const result = p1.toApiShape()
|
|
469
|
-
const string = result.range as IApiScalarShape
|
|
448
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
470
449
|
assert.equal(string.minLength, 1)
|
|
471
450
|
})
|
|
472
451
|
|
|
@@ -476,7 +455,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
476
455
|
maximum: 1,
|
|
477
456
|
}
|
|
478
457
|
const result = p1.toApiShape()
|
|
479
|
-
const string = result.range as IApiScalarShape
|
|
458
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
480
459
|
assert.equal(string.maxLength, 1)
|
|
481
460
|
})
|
|
482
461
|
|
|
@@ -486,7 +465,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
486
465
|
minimum: 1,
|
|
487
466
|
}
|
|
488
467
|
const result = p1.toApiShape()
|
|
489
|
-
const string = result.range as IApiScalarShape
|
|
468
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
490
469
|
assert.equal(string.minimum, 1)
|
|
491
470
|
})
|
|
492
471
|
|
|
@@ -496,7 +475,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
496
475
|
maximum: 1,
|
|
497
476
|
}
|
|
498
477
|
const result = p1.toApiShape()
|
|
499
|
-
const string = result.range as IApiScalarShape
|
|
478
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
500
479
|
assert.equal(string.maximum, 1)
|
|
501
480
|
})
|
|
502
481
|
|
|
@@ -506,7 +485,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
506
485
|
multipleOf: 1,
|
|
507
486
|
}
|
|
508
487
|
const result = p1.toApiShape()
|
|
509
|
-
const string = result.range as IApiScalarShape
|
|
488
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
510
489
|
assert.equal(string.multipleOf, 1)
|
|
511
490
|
})
|
|
512
491
|
|
|
@@ -516,7 +495,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
516
495
|
exclusiveMinimum: true,
|
|
517
496
|
}
|
|
518
497
|
const result = p1.toApiShape()
|
|
519
|
-
const string = result.range as IApiScalarShape
|
|
498
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
520
499
|
assert.isTrue(string.exclusiveMinimum)
|
|
521
500
|
})
|
|
522
501
|
|
|
@@ -526,7 +505,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
526
505
|
exclusiveMaximum: false,
|
|
527
506
|
}
|
|
528
507
|
const result = p1.toApiShape()
|
|
529
|
-
const string = result.range as IApiScalarShape
|
|
508
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
530
509
|
assert.isFalse(string.exclusiveMaximum)
|
|
531
510
|
})
|
|
532
511
|
|
|
@@ -536,7 +515,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
536
515
|
exclusiveMaximum: true,
|
|
537
516
|
}
|
|
538
517
|
const result = p1.toApiShape()
|
|
539
|
-
const string = result.range as IApiScalarShape
|
|
518
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
540
519
|
assert.isTrue(string.exclusiveMaximum)
|
|
541
520
|
})
|
|
542
521
|
|
|
@@ -551,7 +530,7 @@ test.group('property() / with web bindings', (group) => {
|
|
|
551
530
|
},
|
|
552
531
|
]
|
|
553
532
|
const result = p1.toApiShape()
|
|
554
|
-
const string = result.range as IApiScalarShape
|
|
533
|
+
const string = result.range as Shapes.IApiScalarShape
|
|
555
534
|
assert.equal(string.format, AmfNamespace.w3.xmlSchema.float)
|
|
556
535
|
})
|
|
557
536
|
})
|
|
@@ -573,9 +552,9 @@ test.group('property() / with schema', (group) => {
|
|
|
573
552
|
defaultValue: { value: '123', type: 'literal' },
|
|
574
553
|
}
|
|
575
554
|
const result = p1.toApiShape()
|
|
576
|
-
const range = result.range as IApiScalarShape
|
|
555
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
577
556
|
assert.typeOf(range.defaultValue, 'object', 'has the defaultValue')
|
|
578
|
-
const value = range.defaultValue as IApiScalarNode
|
|
557
|
+
const value = range.defaultValue as Shapes.IApiScalarNode
|
|
579
558
|
assert.strictEqual(value.value, '123', 'has the value')
|
|
580
559
|
assert.equal(value.dataType, AmfNamespace.w3.xmlSchema.number, 'has the range data type')
|
|
581
560
|
})
|
|
@@ -586,9 +565,9 @@ test.group('property() / with schema', (group) => {
|
|
|
586
565
|
enum: ['123'],
|
|
587
566
|
}
|
|
588
567
|
const result = p1.toApiShape()
|
|
589
|
-
const range = result.range as IApiScalarShape
|
|
568
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
590
569
|
assert.typeOf(range.values, 'array', 'has the values')
|
|
591
|
-
const value = range.values[0] as IApiScalarNode
|
|
570
|
+
const value = range.values[0] as Shapes.IApiScalarNode
|
|
592
571
|
assert.strictEqual(value.value, '123', 'has the value')
|
|
593
572
|
assert.equal(value.dataType, AmfNamespace.w3.xmlSchema.number, 'has the range data type')
|
|
594
573
|
})
|
|
@@ -599,16 +578,16 @@ test.group('property() / with schema', (group) => {
|
|
|
599
578
|
examples: ['123'],
|
|
600
579
|
}
|
|
601
580
|
const result = p1.toApiShape()
|
|
602
|
-
const range = result.range as IApiScalarShape
|
|
581
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
603
582
|
assert.typeOf(range.examples, 'array', 'has the examples')
|
|
604
|
-
const example = range.examples[0] as IApiDataExample
|
|
583
|
+
const example = range.examples[0] as Shapes.IApiDataExample
|
|
605
584
|
|
|
606
585
|
assert.typeOf(example.id, 'string', 'has the example.id')
|
|
607
586
|
assert.isNotEmpty(example.id, 'the example.id is not empty')
|
|
608
|
-
assert.deepEqual(example.types, IAmfExampleTypes, 'the example.types')
|
|
587
|
+
assert.deepEqual(example.types, AmfTypes.IAmfExampleTypes, 'the example.types')
|
|
609
588
|
assert.typeOf(example.structuredValue, 'object', 'has the example.structuredValue')
|
|
610
589
|
|
|
611
|
-
const value = example.structuredValue as IApiScalarNode
|
|
590
|
+
const value = example.structuredValue as Shapes.IApiScalarNode
|
|
612
591
|
assert.strictEqual(value.value, '123', 'has the value')
|
|
613
592
|
assert.equal(value.dataType, AmfNamespace.w3.xmlSchema.string, 'has the range data type')
|
|
614
593
|
})
|
|
@@ -631,9 +610,9 @@ test.group('property() / default value functions', (group) => {
|
|
|
631
610
|
p1.schema = { defaultValue: { value: 'random', type: 'function' } }
|
|
632
611
|
const generator = new ShapeGenerator()
|
|
633
612
|
const result = generator.property(p1)
|
|
634
|
-
const range = result.range as IApiScalarShape
|
|
613
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
635
614
|
assert.typeOf(range.defaultValue, 'object')
|
|
636
|
-
const value = range.defaultValue as IApiScalarNode
|
|
615
|
+
const value = range.defaultValue as Shapes.IApiScalarNode
|
|
637
616
|
assert.typeOf(value.value, 'string')
|
|
638
617
|
assert.lengthOf(value.value as string, 8)
|
|
639
618
|
})
|
|
@@ -642,9 +621,9 @@ test.group('property() / default value functions', (group) => {
|
|
|
642
621
|
p1.schema = { defaultValue: { value: 'uuid-v4', type: 'function' } }
|
|
643
622
|
const generator = new ShapeGenerator()
|
|
644
623
|
const result = generator.property(p1)
|
|
645
|
-
const range = result.range as IApiScalarShape
|
|
624
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
646
625
|
assert.typeOf(range.defaultValue, 'object')
|
|
647
|
-
const value = range.defaultValue as IApiScalarNode
|
|
626
|
+
const value = range.defaultValue as Shapes.IApiScalarNode
|
|
648
627
|
assert.typeOf(value.value, 'string')
|
|
649
628
|
assert.lengthOf(value.value as string, 36)
|
|
650
629
|
assert.match(value.value as string, /^[0-9a-f-]+$/)
|
|
@@ -655,16 +634,16 @@ test.group('property() / default value functions', (group) => {
|
|
|
655
634
|
p1.schema = { defaultValue: { value: 'incremental', type: 'function' } }
|
|
656
635
|
const generator = new ShapeGenerator()
|
|
657
636
|
const result1 = generator.property(p1)
|
|
658
|
-
const range1 = result1.range as IApiScalarShape
|
|
637
|
+
const range1 = result1.range as Shapes.IApiScalarShape
|
|
659
638
|
assert.typeOf(range1.defaultValue, 'object')
|
|
660
|
-
const value1 = range1.defaultValue as IApiScalarNode
|
|
639
|
+
const value1 = range1.defaultValue as Shapes.IApiScalarNode
|
|
661
640
|
assert.typeOf(value1.value, 'string')
|
|
662
641
|
assert.equal(parseInt(value1.value as string), 0)
|
|
663
642
|
|
|
664
643
|
const result2 = generator.property(p1)
|
|
665
|
-
const range2 = result2.range as IApiScalarShape
|
|
644
|
+
const range2 = result2.range as Shapes.IApiScalarShape
|
|
666
645
|
assert.typeOf(range2.defaultValue, 'object')
|
|
667
|
-
const value2 = range2.defaultValue as IApiScalarNode
|
|
646
|
+
const value2 = range2.defaultValue as Shapes.IApiScalarNode
|
|
668
647
|
assert.typeOf(value2.value, 'string')
|
|
669
648
|
assert.equal(parseInt(value2.value as string), 1)
|
|
670
649
|
})
|
|
@@ -674,9 +653,9 @@ test.group('property() / default value functions', (group) => {
|
|
|
674
653
|
p1.schema = { defaultValue: { value: 'now', type: 'function' } }
|
|
675
654
|
const generator = new ShapeGenerator()
|
|
676
655
|
const result = generator.property(p1)
|
|
677
|
-
const range = result.range as IApiScalarShape
|
|
656
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
678
657
|
assert.typeOf(range.defaultValue, 'object')
|
|
679
|
-
const value = range.defaultValue as IApiScalarNode
|
|
658
|
+
const value = range.defaultValue as Shapes.IApiScalarNode
|
|
680
659
|
assert.typeOf(value.value, 'string')
|
|
681
660
|
assert.match(value.value as string, /^\d{4}-\d{2}-\d{2}$/)
|
|
682
661
|
})
|
|
@@ -686,9 +665,9 @@ test.group('property() / default value functions', (group) => {
|
|
|
686
665
|
p1.schema = { defaultValue: { value: 'now', type: 'function' } }
|
|
687
666
|
const generator = new ShapeGenerator()
|
|
688
667
|
const result = generator.property(p1)
|
|
689
|
-
const range = result.range as IApiScalarShape
|
|
668
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
690
669
|
assert.typeOf(range.defaultValue, 'object')
|
|
691
|
-
const value = range.defaultValue as IApiScalarNode
|
|
670
|
+
const value = range.defaultValue as Shapes.IApiScalarNode
|
|
692
671
|
assert.typeOf(value.value, 'string')
|
|
693
672
|
assert.match(value.value as string, /^\d{2}:\d{2}:\d{2}$/)
|
|
694
673
|
})
|
|
@@ -698,9 +677,9 @@ test.group('property() / default value functions', (group) => {
|
|
|
698
677
|
p1.schema = { defaultValue: { value: 'now', type: 'function' } }
|
|
699
678
|
const generator = new ShapeGenerator()
|
|
700
679
|
const result = generator.property(p1)
|
|
701
|
-
const range = result.range as IApiScalarShape
|
|
680
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
702
681
|
assert.typeOf(range.defaultValue, 'object')
|
|
703
|
-
const value = range.defaultValue as IApiScalarNode
|
|
682
|
+
const value = range.defaultValue as Shapes.IApiScalarNode
|
|
704
683
|
assert.typeOf(value.value, 'string')
|
|
705
684
|
assert.match(value.value as string, /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/)
|
|
706
685
|
})
|
|
@@ -709,7 +688,7 @@ test.group('property() / default value functions', (group) => {
|
|
|
709
688
|
p1.schema = { defaultValue: { value: 'unsupported', type: 'function' } }
|
|
710
689
|
const generator = new ShapeGenerator()
|
|
711
690
|
const result = generator.property(p1)
|
|
712
|
-
const range = result.range as IApiScalarShape
|
|
691
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
713
692
|
assert.isUndefined(range.defaultValue)
|
|
714
693
|
})
|
|
715
694
|
})
|
|
@@ -730,8 +709,8 @@ test.group('refactorArrayToShape()', (group) => {
|
|
|
730
709
|
test('returns the array items', ({ assert }) => {
|
|
731
710
|
p1.multiple = true
|
|
732
711
|
const parameter = p1.toApiShape()
|
|
733
|
-
const range = parameter.range as IApiArrayShape
|
|
734
|
-
const shape = range.items as IApiScalarShape
|
|
712
|
+
const range = parameter.range as Shapes.IApiArrayShape
|
|
713
|
+
const shape = range.items as Shapes.IApiScalarShape
|
|
735
714
|
assert.deepEqual(range.items, shape)
|
|
736
715
|
})
|
|
737
716
|
})
|
|
@@ -751,15 +730,15 @@ test.group('refactorShapeToArray()', (group) => {
|
|
|
751
730
|
|
|
752
731
|
test('returns the array items', ({ assert }) => {
|
|
753
732
|
const parameter = p1.toApiShape()
|
|
754
|
-
const range = parameter.range as IApiScalarShape
|
|
733
|
+
const range = parameter.range as Shapes.IApiScalarShape
|
|
755
734
|
const generator = new ShapeGenerator()
|
|
756
735
|
const result = generator['refactorShapeToArray'](p1.key, range)
|
|
757
736
|
|
|
758
737
|
assert.typeOf(result, 'object', 'has the range')
|
|
759
738
|
assert.equal(result.id, `array-shape-${p1.key}`, 'has the id')
|
|
760
|
-
assert.deepEqual(result.types, IAmfArrayTypes, 'has the types')
|
|
739
|
+
assert.deepEqual(result.types, AmfTypes.IAmfArrayTypes, 'has the types')
|
|
761
740
|
|
|
762
|
-
const items = result.items as IApiScalarShape
|
|
741
|
+
const items = result.items as Shapes.IApiScalarShape
|
|
763
742
|
assert.deepEqual(items, range)
|
|
764
743
|
})
|
|
765
744
|
})
|
|
@@ -787,7 +766,7 @@ test.group('associationProperty()', (group) => {
|
|
|
787
766
|
assert.typeOf(result, 'object')
|
|
788
767
|
|
|
789
768
|
assert.equal(result.id, a1.key, 'has the id')
|
|
790
|
-
assert.deepEqual(result.types, IAmfPropertyTypes, 'has the types')
|
|
769
|
+
assert.deepEqual(result.types, AmfTypes.IAmfPropertyTypes, 'has the types')
|
|
791
770
|
assert.deepEqual(result.values, [], 'has the values')
|
|
792
771
|
assert.deepEqual(result.inherits, [], 'has the inherits')
|
|
793
772
|
assert.deepEqual(result.or, [], 'has the or')
|
|
@@ -795,19 +774,19 @@ test.group('associationProperty()', (group) => {
|
|
|
795
774
|
assert.deepEqual(result.xone, [], 'has the xone')
|
|
796
775
|
assert.equal(result.path, AmfNamespace.aml.vocabularies.data.key + 'a1', 'has the path')
|
|
797
776
|
|
|
798
|
-
const range = result.range as IApiNodeShape
|
|
777
|
+
const range = result.range as Shapes.IApiNodeShape
|
|
799
778
|
assert.typeOf(range, 'object', 'has the range')
|
|
800
|
-
assert.deepEqual(range.types, IAmfNodeTypes, 'range has the types')
|
|
779
|
+
assert.deepEqual(range.types, AmfTypes.IAmfNodeTypes, 'range has the types')
|
|
801
780
|
assert.equal(range.name, 'e2', 'range has the name')
|
|
802
781
|
assert.lengthOf(range.properties, 1, 'range has the properties')
|
|
803
782
|
|
|
804
783
|
const [prop] = range.properties
|
|
805
784
|
assert.equal(prop.id, p2.key, 'property has the id')
|
|
806
|
-
assert.deepEqual(prop.types, IAmfPropertyTypes, 'property has the types')
|
|
785
|
+
assert.deepEqual(prop.types, AmfTypes.IAmfPropertyTypes, 'property has the types')
|
|
807
786
|
|
|
808
|
-
const pRange = prop.range as IApiScalarShape
|
|
787
|
+
const pRange = prop.range as Shapes.IApiScalarShape
|
|
809
788
|
assert.typeOf(pRange, 'object', 'property range is an object')
|
|
810
|
-
assert.deepEqual(pRange.types, IAmfScalarTypes, 'property range has the types')
|
|
789
|
+
assert.deepEqual(pRange.types, AmfTypes.IAmfScalarTypes, 'property range has the types')
|
|
811
790
|
assert.equal(pRange.name, 'p2', 'property range has the name')
|
|
812
791
|
assert.equal(pRange.dataType, AmfNamespace.w3.xmlSchema.number, 'property range has the dataType')
|
|
813
792
|
})
|
|
@@ -836,9 +815,9 @@ test.group('associationProperty()', (group) => {
|
|
|
836
815
|
test('returns a link definition when created on the schema', ({ assert }) => {
|
|
837
816
|
a1.schema = { linked: true }
|
|
838
817
|
const result = a1.toApiShape()
|
|
839
|
-
const range = result.range as IApiScalarShape
|
|
818
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
840
819
|
assert.equal(range.id, `link-${a1.key}`)
|
|
841
|
-
assert.deepEqual(range.types, IAmfScalarTypes)
|
|
820
|
+
assert.deepEqual(range.types, AmfTypes.IAmfScalarTypes)
|
|
842
821
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.string)
|
|
843
822
|
})
|
|
844
823
|
|
|
@@ -846,16 +825,16 @@ test.group('associationProperty()', (group) => {
|
|
|
846
825
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
847
826
|
a1.addTarget(e3)
|
|
848
827
|
const result = a1.toApiShape()
|
|
849
|
-
const range = result.range as IApiUnionShape
|
|
828
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
850
829
|
|
|
851
830
|
assert.typeOf(range, 'object', 'has the range')
|
|
852
831
|
assert.equal(range.id, `union-shape-${a1.key}`, 'the range has the id')
|
|
853
|
-
assert.deepEqual(range.types, IAmfUnionTypes, 'the range has the types')
|
|
832
|
+
assert.deepEqual(range.types, AmfTypes.IAmfUnionTypes, 'the range has the types')
|
|
854
833
|
assert.lengthOf(range.anyOf, 2, 'has the anyOf array')
|
|
855
|
-
const [p1, p2] = range.anyOf as IApiNodeShape[]
|
|
834
|
+
const [p1, p2] = range.anyOf as Shapes.IApiNodeShape[]
|
|
856
835
|
|
|
857
|
-
assert.deepEqual(p1.types, IAmfNodeTypes, 'p1 has the types')
|
|
858
|
-
assert.deepEqual(p2.types, IAmfNodeTypes, 'p2 has the types')
|
|
836
|
+
assert.deepEqual(p1.types, AmfTypes.IAmfNodeTypes, 'p1 has the types')
|
|
837
|
+
assert.deepEqual(p2.types, AmfTypes.IAmfNodeTypes, 'p2 has the types')
|
|
859
838
|
assert.lengthOf(p1.properties, 1, 'p1 has the properties')
|
|
860
839
|
assert.lengthOf(p2.properties, 0, 'p2 has the properties')
|
|
861
840
|
})
|
|
@@ -869,12 +848,12 @@ test.group('associationProperty()', (group) => {
|
|
|
869
848
|
test('returns an array shape when multiple', ({ assert }) => {
|
|
870
849
|
a1.multiple = true
|
|
871
850
|
const result = a1.toApiShape()
|
|
872
|
-
const range = result.range as IApiArrayShape
|
|
873
|
-
assert.deepEqual(range.types, IAmfArrayTypes)
|
|
851
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
852
|
+
assert.deepEqual(range.types, AmfTypes.IAmfArrayTypes)
|
|
874
853
|
|
|
875
|
-
const arrayRange = range.items as IApiNodeShape
|
|
854
|
+
const arrayRange = range.items as Shapes.IApiNodeShape
|
|
876
855
|
assert.typeOf(arrayRange, 'object', 'has the range')
|
|
877
|
-
assert.deepEqual(arrayRange.types, IAmfNodeTypes, 'range has the types')
|
|
856
|
+
assert.deepEqual(arrayRange.types, AmfTypes.IAmfNodeTypes, 'range has the types')
|
|
878
857
|
assert.equal(arrayRange.name, 'e2', 'range has the name')
|
|
879
858
|
assert.lengthOf(arrayRange.properties, 1, 'range has the properties')
|
|
880
859
|
})
|
|
@@ -885,16 +864,16 @@ test.group('associationProperty()', (group) => {
|
|
|
885
864
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
886
865
|
a1.addTarget(e3)
|
|
887
866
|
const result = a1.toApiShape()
|
|
888
|
-
const range = result.range as IApiUnionShape
|
|
867
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
889
868
|
|
|
890
869
|
assert.typeOf(range, 'object', 'has the range')
|
|
891
870
|
assert.equal(range.id, `union-shape-${a1.key}`, 'the range has the id')
|
|
892
|
-
assert.deepEqual(range.types, IAmfUnionTypes, 'the range has the types')
|
|
871
|
+
assert.deepEqual(range.types, AmfTypes.IAmfUnionTypes, 'the range has the types')
|
|
893
872
|
assert.lengthOf(range.anyOf, 2, 'has the anyOf array')
|
|
894
|
-
const [p1, p2] = range.anyOf as IApiNodeShape[]
|
|
873
|
+
const [p1, p2] = range.anyOf as Shapes.IApiNodeShape[]
|
|
895
874
|
|
|
896
|
-
assert.deepEqual(p1.types, IAmfNodeTypes, 'p1 has the types')
|
|
897
|
-
assert.deepEqual(p2.types, IAmfNodeTypes, 'p2 has the types')
|
|
875
|
+
assert.deepEqual(p1.types, AmfTypes.IAmfNodeTypes, 'p1 has the types')
|
|
876
|
+
assert.deepEqual(p2.types, AmfTypes.IAmfNodeTypes, 'p2 has the types')
|
|
898
877
|
assert.lengthOf(p1.properties, 1, 'p1 has the properties')
|
|
899
878
|
assert.lengthOf(p2.properties, 0, 'p2 has the properties')
|
|
900
879
|
})
|
|
@@ -905,16 +884,16 @@ test.group('associationProperty()', (group) => {
|
|
|
905
884
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
906
885
|
a1.addTarget(e3)
|
|
907
886
|
const result = a1.toApiShape()
|
|
908
|
-
const range = result.range as IApiUnionShape
|
|
887
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
909
888
|
|
|
910
889
|
assert.typeOf(range, 'object', 'has the range')
|
|
911
890
|
assert.equal(range.id, `union-shape-${a1.key}`, 'the range has the id')
|
|
912
|
-
assert.deepEqual(range.types, IAmfUnionTypes, 'the range has the types')
|
|
891
|
+
assert.deepEqual(range.types, AmfTypes.IAmfUnionTypes, 'the range has the types')
|
|
913
892
|
assert.lengthOf(range.and, 2, 'has the anyOf array')
|
|
914
|
-
const [p1, p2] = range.and as IApiNodeShape[]
|
|
893
|
+
const [p1, p2] = range.and as Shapes.IApiNodeShape[]
|
|
915
894
|
|
|
916
|
-
assert.deepEqual(p1.types, IAmfNodeTypes, 'p1 has the types')
|
|
917
|
-
assert.deepEqual(p2.types, IAmfNodeTypes, 'p2 has the types')
|
|
895
|
+
assert.deepEqual(p1.types, AmfTypes.IAmfNodeTypes, 'p1 has the types')
|
|
896
|
+
assert.deepEqual(p2.types, AmfTypes.IAmfNodeTypes, 'p2 has the types')
|
|
918
897
|
assert.lengthOf(p1.properties, 1, 'p1 has the properties')
|
|
919
898
|
assert.lengthOf(p2.properties, 0, 'p2 has the properties')
|
|
920
899
|
})
|
|
@@ -925,16 +904,16 @@ test.group('associationProperty()', (group) => {
|
|
|
925
904
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
926
905
|
a1.addTarget(e3)
|
|
927
906
|
const result = a1.toApiShape()
|
|
928
|
-
const range = result.range as IApiUnionShape
|
|
907
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
929
908
|
|
|
930
909
|
assert.typeOf(range, 'object', 'has the range')
|
|
931
910
|
assert.equal(range.id, `union-shape-${a1.key}`, 'the range has the id')
|
|
932
|
-
assert.deepEqual(range.types, IAmfUnionTypes, 'the range has the types')
|
|
911
|
+
assert.deepEqual(range.types, AmfTypes.IAmfUnionTypes, 'the range has the types')
|
|
933
912
|
assert.lengthOf(range.xone, 2, 'has the oneOf array')
|
|
934
|
-
const [p1, p2] = range.xone as IApiNodeShape[]
|
|
913
|
+
const [p1, p2] = range.xone as Shapes.IApiNodeShape[]
|
|
935
914
|
|
|
936
|
-
assert.deepEqual(p1.types, IAmfNodeTypes, 'p1 has the types')
|
|
937
|
-
assert.deepEqual(p2.types, IAmfNodeTypes, 'p2 has the types')
|
|
915
|
+
assert.deepEqual(p1.types, AmfTypes.IAmfNodeTypes, 'p1 has the types')
|
|
916
|
+
assert.deepEqual(p2.types, AmfTypes.IAmfNodeTypes, 'p2 has the types')
|
|
938
917
|
assert.lengthOf(p1.properties, 1, 'p1 has the properties')
|
|
939
918
|
assert.lengthOf(p2.properties, 0, 'p2 has the properties')
|
|
940
919
|
})
|
|
@@ -945,16 +924,16 @@ test.group('associationProperty()', (group) => {
|
|
|
945
924
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
946
925
|
a1.addTarget(e3)
|
|
947
926
|
const result = a1.toApiShape()
|
|
948
|
-
const range = result.range as IApiUnionShape
|
|
927
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
949
928
|
|
|
950
929
|
assert.typeOf(range, 'object', 'has the range')
|
|
951
930
|
assert.equal(range.id, `union-shape-${a1.key}`, 'the range has the id')
|
|
952
|
-
assert.deepEqual(range.types, IAmfUnionTypes, 'the range has the types')
|
|
931
|
+
assert.deepEqual(range.types, AmfTypes.IAmfUnionTypes, 'the range has the types')
|
|
953
932
|
assert.typeOf(range.not, 'object', 'has the not object')
|
|
954
933
|
|
|
955
|
-
const not = range.not as IApiNodeShape
|
|
956
|
-
assert.deepEqual(not.types, IAmfNodeTypes, 'p1 has the types')
|
|
957
|
-
assert.deepEqual(not.types, IAmfNodeTypes, 'p2 has the types')
|
|
934
|
+
const not = range.not as Shapes.IApiNodeShape
|
|
935
|
+
assert.deepEqual(not.types, AmfTypes.IAmfNodeTypes, 'p1 has the types')
|
|
936
|
+
assert.deepEqual(not.types, AmfTypes.IAmfNodeTypes, 'p2 has the types')
|
|
958
937
|
assert.lengthOf(not.properties, 1, 'p1 has the properties')
|
|
959
938
|
})
|
|
960
939
|
|
|
@@ -962,16 +941,16 @@ test.group('associationProperty()', (group) => {
|
|
|
962
941
|
a1.schema = { unionType: 'not' }
|
|
963
942
|
|
|
964
943
|
const result = a1.toApiShape()
|
|
965
|
-
const range = result.range as IApiUnionShape
|
|
944
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
966
945
|
|
|
967
946
|
assert.typeOf(range, 'object', 'has the range')
|
|
968
947
|
assert.equal(range.id, `not-shape-${a1.key}`, 'the range has the id')
|
|
969
|
-
assert.deepEqual(range.types, IAmfAnyTypes, 'the range has the types')
|
|
948
|
+
assert.deepEqual(range.types, AmfTypes.IAmfAnyTypes, 'the range has the types')
|
|
970
949
|
assert.typeOf(range.not, 'object', 'has the not object')
|
|
971
950
|
|
|
972
|
-
const not = range.not as IApiNodeShape
|
|
973
|
-
assert.deepEqual(not.types, IAmfNodeTypes, 'p1 has the types')
|
|
974
|
-
assert.deepEqual(not.types, IAmfNodeTypes, 'p2 has the types')
|
|
951
|
+
const not = range.not as Shapes.IApiNodeShape
|
|
952
|
+
assert.deepEqual(not.types, AmfTypes.IAmfNodeTypes, 'p1 has the types')
|
|
953
|
+
assert.deepEqual(not.types, AmfTypes.IAmfNodeTypes, 'p2 has the types')
|
|
975
954
|
assert.lengthOf(not.properties, 1, 'p1 has the properties')
|
|
976
955
|
})
|
|
977
956
|
|
|
@@ -982,19 +961,19 @@ test.group('associationProperty()', (group) => {
|
|
|
982
961
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
983
962
|
a1.addTarget(e3)
|
|
984
963
|
const result = a1.toApiShape()
|
|
985
|
-
const range = result.range as IApiArrayShape
|
|
964
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
986
965
|
|
|
987
966
|
assert.typeOf(range, 'object', 'has the range')
|
|
988
967
|
assert.equal(range.id, `array-shape-${a1.key}`, 'the range has the id')
|
|
989
|
-
assert.deepEqual(range.types, IAmfArrayTypes, 'the range has the types')
|
|
968
|
+
assert.deepEqual(range.types, AmfTypes.IAmfArrayTypes, 'the range has the types')
|
|
990
969
|
|
|
991
|
-
const items = range.items as IApiUnionShape
|
|
970
|
+
const items = range.items as Shapes.IApiUnionShape
|
|
992
971
|
|
|
993
972
|
assert.lengthOf(items.anyOf, 2, 'has the anyOf array')
|
|
994
|
-
const [p1, p2] = items.anyOf as IApiNodeShape[]
|
|
973
|
+
const [p1, p2] = items.anyOf as Shapes.IApiNodeShape[]
|
|
995
974
|
|
|
996
|
-
assert.deepEqual(p1.types, IAmfNodeTypes, 'p1 has the types')
|
|
997
|
-
assert.deepEqual(p2.types, IAmfNodeTypes, 'p2 has the types')
|
|
975
|
+
assert.deepEqual(p1.types, AmfTypes.IAmfNodeTypes, 'p1 has the types')
|
|
976
|
+
assert.deepEqual(p2.types, AmfTypes.IAmfNodeTypes, 'p2 has the types')
|
|
998
977
|
assert.lengthOf(p1.properties, 1, 'p1 has the properties')
|
|
999
978
|
assert.lengthOf(p2.properties, 0, 'p2 has the properties')
|
|
1000
979
|
})
|
|
@@ -1002,7 +981,7 @@ test.group('associationProperty()', (group) => {
|
|
|
1002
981
|
test('handles linked schema', ({ assert }) => {
|
|
1003
982
|
a1.schema = { linked: true }
|
|
1004
983
|
const result = a1.toApiShape()
|
|
1005
|
-
const range = result.range as IApiScalarShape
|
|
984
|
+
const range = result.range as Shapes.IApiScalarShape
|
|
1006
985
|
assert.equal(range.dataType, AmfNamespace.w3.xmlSchema.string)
|
|
1007
986
|
})
|
|
1008
987
|
|
|
@@ -1010,7 +989,7 @@ test.group('associationProperty()', (group) => {
|
|
|
1010
989
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
1011
990
|
a1.addTarget(e3)
|
|
1012
991
|
const result = a1.toApiShape()
|
|
1013
|
-
const range = result.range as IApiUnionShape
|
|
992
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
1014
993
|
assert.lengthOf(range.anyOf, 2)
|
|
1015
994
|
})
|
|
1016
995
|
|
|
@@ -1019,7 +998,7 @@ test.group('associationProperty()', (group) => {
|
|
|
1019
998
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
1020
999
|
a1.addTarget(e3)
|
|
1021
1000
|
const result = a1.toApiShape()
|
|
1022
|
-
const range = result.range as IApiUnionShape
|
|
1001
|
+
const range = result.range as Shapes.IApiUnionShape
|
|
1023
1002
|
assert.lengthOf(range.and, 2)
|
|
1024
1003
|
})
|
|
1025
1004
|
|
|
@@ -1029,8 +1008,8 @@ test.group('associationProperty()', (group) => {
|
|
|
1029
1008
|
const e3 = m1.addEntity({ key: 'e3', info: { name: 'e3' } })
|
|
1030
1009
|
a1.addTarget(e3)
|
|
1031
1010
|
const result = a1.toApiShape()
|
|
1032
|
-
const range = result.range as IApiArrayShape
|
|
1033
|
-
const items = range.items as
|
|
1011
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1012
|
+
const items = range.items as Shapes.IApiUnionShape
|
|
1034
1013
|
assert.lengthOf(items.and, 2)
|
|
1035
1014
|
})
|
|
1036
1015
|
})
|
|
@@ -1056,7 +1035,7 @@ test.group('AI Generated tests', (group) => {
|
|
|
1056
1035
|
const p3 = e1.addProperty({ key: 'p3', info: { name: 'p3' } })
|
|
1057
1036
|
const bindings = p3.getWebBinding()
|
|
1058
1037
|
bindings.hidden = true
|
|
1059
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
1038
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
1060
1039
|
assert.lengthOf(result.properties, 2)
|
|
1061
1040
|
assert.isFalse(result.properties.some((prop) => prop.id === p3.key))
|
|
1062
1041
|
})
|
|
@@ -1068,7 +1047,7 @@ test.group('AI Generated tests', (group) => {
|
|
|
1068
1047
|
fd1.info.version = '1.0.0'
|
|
1069
1048
|
root.registerForeignDomain(fd1)
|
|
1070
1049
|
const a2 = e1.addAssociation({ targets: [{ key: e3.key, domain: fd1.key }], key: 'a2', info: { name: 'a2' } })
|
|
1071
|
-
const result = e1.toApiShape() as IApiNodeShape
|
|
1050
|
+
const result = e1.toApiShape() as Shapes.IApiNodeShape
|
|
1072
1051
|
assert.lengthOf(result.properties, 3)
|
|
1073
1052
|
assert.isTrue(result.properties.some((prop) => prop.id === a2.key))
|
|
1074
1053
|
})
|
|
@@ -1077,7 +1056,7 @@ test.group('AI Generated tests', (group) => {
|
|
|
1077
1056
|
p1.multiple = true
|
|
1078
1057
|
p1.schema = { examples: ['example1', 'example2'] }
|
|
1079
1058
|
const result = p1.toApiShape()
|
|
1080
|
-
const range = result.range as IApiArrayShape
|
|
1059
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1081
1060
|
assert.include(range.types, AmfNamespace.aml.vocabularies.shapes.ArrayShape)
|
|
1082
1061
|
assert.lengthOf(range.examples, 1)
|
|
1083
1062
|
assert.property(range.examples[0], 'structuredValue')
|
|
@@ -1087,7 +1066,7 @@ test.group('AI Generated tests', (group) => {
|
|
|
1087
1066
|
p1.multiple = true
|
|
1088
1067
|
p1.schema = { defaultValue: { value: 'defaultValue', type: 'literal' } }
|
|
1089
1068
|
const result = p1.toApiShape()
|
|
1090
|
-
const range = result.range as IApiArrayShape
|
|
1069
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1091
1070
|
assert.include(range.types, AmfNamespace.aml.vocabularies.shapes.ArrayShape)
|
|
1092
1071
|
assert.property(range, 'defaultValue')
|
|
1093
1072
|
assert.containsSubset(range.defaultValue, {
|
|
@@ -1099,7 +1078,7 @@ test.group('AI Generated tests', (group) => {
|
|
|
1099
1078
|
p1.multiple = true
|
|
1100
1079
|
p1.schema = { enum: ['enum1', 'enum2'] }
|
|
1101
1080
|
const result = p1.toApiShape()
|
|
1102
|
-
const range = result.range as IApiArrayShape
|
|
1081
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1103
1082
|
assert.include(range.types, AmfNamespace.aml.vocabularies.shapes.ArrayShape)
|
|
1104
1083
|
assert.lengthOf(range.values, 2)
|
|
1105
1084
|
assert.containsSubset(range.values[0], {
|
|
@@ -1116,9 +1095,9 @@ test.group('AI Generated tests', (group) => {
|
|
|
1116
1095
|
p1.multiple = true
|
|
1117
1096
|
p1.schema = { minimum: 1, maximum: 10 }
|
|
1118
1097
|
const result = p1.toApiShape()
|
|
1119
|
-
const range = result.range as IApiArrayShape
|
|
1098
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1120
1099
|
assert.include(range.types, AmfNamespace.aml.vocabularies.shapes.ArrayShape)
|
|
1121
|
-
const items = range.items as IApiScalarShape
|
|
1100
|
+
const items = range.items as Shapes.IApiScalarShape
|
|
1122
1101
|
assert.equal(items.minLength, 1)
|
|
1123
1102
|
assert.equal(items.maxLength, 10)
|
|
1124
1103
|
})
|
|
@@ -1134,8 +1113,8 @@ test.group('AI Generated tests', (group) => {
|
|
|
1134
1113
|
},
|
|
1135
1114
|
]
|
|
1136
1115
|
const result = p1.toApiShape()
|
|
1137
|
-
const range = result.range as IApiArrayShape
|
|
1138
|
-
const items = range.items as IApiScalarShape
|
|
1116
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1117
|
+
const items = range.items as Shapes.IApiScalarShape
|
|
1139
1118
|
assert.include(range.types, AmfNamespace.aml.vocabularies.shapes.ArrayShape)
|
|
1140
1119
|
assert.equal(items.format, AmfNamespace.w3.xmlSchema.integer)
|
|
1141
1120
|
})
|
|
@@ -1144,9 +1123,9 @@ test.group('AI Generated tests', (group) => {
|
|
|
1144
1123
|
a1.multiple = true
|
|
1145
1124
|
a1.schema = { linked: false }
|
|
1146
1125
|
const result = a1.toApiShape()
|
|
1147
|
-
const range = result.range as IApiArrayShape
|
|
1126
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1148
1127
|
assert.include(range.types, AmfNamespace.aml.vocabularies.shapes.ArrayShape)
|
|
1149
|
-
const items = range.items as IApiScalarShape
|
|
1128
|
+
const items = range.items as Shapes.IApiScalarShape
|
|
1150
1129
|
assert.ok(items)
|
|
1151
1130
|
})
|
|
1152
1131
|
|
|
@@ -1161,9 +1140,9 @@ test.group('AI Generated tests', (group) => {
|
|
|
1161
1140
|
},
|
|
1162
1141
|
]
|
|
1163
1142
|
const result = a1.toApiShape()
|
|
1164
|
-
const range = result.range as IApiArrayShape
|
|
1143
|
+
const range = result.range as Shapes.IApiArrayShape
|
|
1165
1144
|
assert.include(range.types, AmfNamespace.aml.vocabularies.shapes.ArrayShape)
|
|
1166
|
-
const items = range.items as IApiNodeShape
|
|
1145
|
+
const items = range.items as Shapes.IApiNodeShape
|
|
1167
1146
|
assert.ok(items.properties)
|
|
1168
1147
|
})
|
|
1169
1148
|
})
|