Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
# Realization Reuse
## Description
This suite of tests verifies the identity, naming, and reuse of generated
realizations.
## Tests
### CollectionRoots
Description
This test ensures that a single root-level realization is correctly
shared across two collectionResources.
This test ensures that a single root-level realization is correctly
shared across single-valued root contexts, including:
* ObjectResource root-level realization
* Request and response message-level realizations. Message-defined
realizations (using the `type` keyword) are always assumed to be
single-valued.
Note that the resource-level realization in `PersonCollection`
has an inline realization. This is to avoid the problem described
in https://modelsolv.atlassian.net/browse/ZEN-4084.
This test verifies that a single-valued realization can be shared
across all single-valued contexts, including:
* ObjectResource root-level realization
* Request and response message-level realizations. Message-defined
realizations (using the `type` keyword) are always assumed to be
single-valued.
* Single-valued references.
The realization model defines:
* a `${TypeName}_Object` realization that can be used in any
single-valued context, and embeds all properties.
* a `${TypeName}_List` realization that can be used in any multi-valued
context, and embeds only reference properties. (This rule should not
be instantiated in this test case.)
This test verifies that a multi-valued realization can be shared
across all multi-valued contexts, including:
* CollectionResource root-level realization
* Multi-valued references.
The realization model defines:
* a `${TypeName}_Object` realization that can be used in any
single-valued context, and embeds all properties.
* a `${TypeName}_List` realization that can be used in any multi-valued
context, and embeds only reference properties.
**Note:** I am seeing multiple problems with this in API Studio. If these problems are
not evident in the generated realization graph, and therefore don't translate into
failing tests, we need to extract them as separate issues, to be resolved in downstream
generators:
* The live documentation view shows the Accountant "clients" reference as a hyperlink to
PersonCollection, as if it's using factory-default realization, realizing this reference
as a hyperlink to the autoLink resource. This isn't right.
* In the generated Swagger RXC:
* The `Person_List` schema is object-typed, not array-typed. It has only
`_rapid_links`, no reference to the `Person_List_item` schema.
* The `Person_List_item` schema doesn't define any properties.
This test attempts to use single root-level realization
across single-valued and multi-valued contexts.
**Note:** Expect this to fail, and do not expect to fix it in the
current project scope.
This uses the same realization in single-valued contexts
(including objectResource and message contexts, which are always handled
as single-valued), and in and multi-valued contexts (collectionResource).
The realization may be created and referenced properly in the ZenModel,
but it will not generate a correct set of schemas in Swagger RXC. This
demonstrates the problem described in
https://modelsolv.atlassian.net/browse/ZEN-4084