Extracts texts for localization from OpenAPI specification.

Usage

apigenie i18n [OPTIONS] FILE

Description

This command extracts texts suitable for translations, from an OpenAPI documents. Extracted texts are written in key-value files, where keys are JSON pointers to locations in the input file, and values are literals located pointed to by keys.

Example:

apigenie i18n --output i18n-en.json openapi-in.yaml

may produce the following output:

/info/title: My API
/info/contact/name: My Team

The command extracts the following properties:

ObjectProperties
Infotitle, summary, description
Contactname
Licensename
Serverdescription
ServerVariabledescription
PathItemsummary, description
Schematitle, description
Responsedescription
Parameterdescription
Examplesummary, description
RequestBodydescription
Headerdescription
SecuritySchemedescription
Linkdescription
Operationsummary, description
ExternalDocumentationdescription
Tagdescription

Options

—output NAME

Name of the file with extracted texts. Format of the file is determined by its extension, which can be either .json or .yaml. Other extenstions will result in error.