Swagger file combination ordering
- A combines with B.
- B combines with C.
- C combines with A.
PolicyCenter combines the various schemas in the order in which
each appears in the x-gw-combine property. PolicyCenter also loads and combines all referenced schemas before
processing the full schema chain.
Example
To provide a concrete example, suppose that schema A and schema A' have the following designated meanings:- Schema A - The file as it is on disk.
- Schema A' - The logical schema after PolicyCenter combines
the file with everything that it references using property
x-gw-combine.
- PolicyCenter loads B' (B combined with D) and C' (C combined with D) into memory.
- PolicyCenter creates a list of the root objects from A, B', and C', in that order.
- PolicyCenter follows the full document tree, starting with these root objects, according to the merge rules defined in Guidewire Swagger specification.
The root objects always exist in all three schemas (A, B, C). However, it is possible
that a given logical object appears in one, two, or all three of the schemas. For each
collection of matching objects, PolicyCenter always considers
A (if present), then B' (if present), and finally C' (if present), in that order. For
example, suppose C' defines a path property of
"/contacts/{contactId}" with a GET operation. If C' is
the only schema that defines that operation, A inherits the definition from C' exactly as it
is. If B' also defines that operation, B's definition of the property overrides the
definition in C'. If A' also defines that operation, A then overrides any properties also
specified in B' or C'.
