Associating display keys with API elements

Every API is defined in multiple files. For a given API:

  • There are one or more schema.json files that define the schemas.
  • There are one or more swagger.yaml files that define endpoints and their behaviors.

In order to pair localized keys with the correct API elements:

  • Every schema.json file and swagger.yaml file must provide or inherit a localization key prefix.
    • The prefix can be declared added to a file.
    • The prefix can be inherited from another file when schemas are combined. For example, the schema extension files, such as account_ext-1.0.swagger.yaml, are combined with base configuration files. Localization prefixes declared in the base configuration files are inherited by the schemas in the extension files.
  • Every display key must adhere to a specific pattern that uses the localization key prefix.