File published-apis.yaml document objects

File published-apis.yaml contains the following document objects:
  • Root object
  • API object
  • Default template object

Root object

Property Type Required Usage
apis API object Yes

The set of APIs to publish. It is possible for the same API name to appear multiple times in the list. At runtime, the REST framework chooses the configuration with the most specific match based on the env and server properties.

It is a configuration error for multiple entries to have the same specificity at runtime. The set of paths for all published APIs must be non-overlapping as well.

If you need to publish two different versions of the same API at the same time, those APIs must define different baseUrl values to ensure uniqueness. For example, use /users/v1.0 and /users/v1.0.1 to make the APIs different.

defaultTemplate Default template object Yes

The set of default templates to use with the listed APIs. However, at runtime, the REST framework uses only a single entry in the list, based on the server and environment properties.

The REST framework uses the default template for any entry in the APIs list that does not explicitly define a template.

API object

Property Type Required Usage
name string Yes The fully-qualified name of a Swagger schema to publish.
template string No The fully-qualified name of a Swagger schema to include as the template for this API. If this value is null, the REST framework uses the default template.
published boolean No

The Boolean value indicates whether the REST framework is to publish the API. The default value is true.

You can use this property in either of the following ways:
  • If you choose to use the env and server properties, set this property value to false to explicitly indicate that a given API must not be published in a particular environment or server.
  • If your PolicyCenter installation uses property substitution, you can set the published property to an externalized property. In that way you can use property substitution to set the value to true or false.
env string No The environment to use in attempting to match this configuration element. If the file specifies the same API multiple times, the REST framework uses the most specific match based on the API env and server properties.
server string No The server to use in attempting to match this configuration element. If the file specifies the same API multiple times, the REST framework uses the most specific match based on the API env and server properties.

Default template object

Property Type Required Usage
name string Yes The fully-qualified name of the template to use as the default for APIs listed under apis that do not explicitly specify a template property.
env string No The environment to use in attempting to match this configuration element. If the file specifies the same API multiple times, the REST framework uses the most specific match based on the API env and server properties.
server string No The server to use in attempting to match this configuration element. If the file specifies the same API multiple times, the REST framework uses the most specific match based on the API env and server properties.