@sap/cds-dk
Version:
Command line client and development toolkit for the SAP Cloud Application Programming Model
51 lines (47 loc) • 3.95 kB
JavaScript
"use strict";
const messages = {
INVALID_EDMX_METADATA: 'The OData model is not valid. Specify the correct OData model.',
INVALID_ODATA_VERSION_OR_UNSUPPORTED_ENCODING: 'Either the OData version is not valid, or the encoding of the file is not utf-8. Please specify the supported OData version and file encoding. OData version is expected one of [1.0, 2.0, 4.0, 4.01] and the input file encoding is expected UTF-8.',
INVALID_OUTPUT_FILE: 'Please provide an output file with one of these [cds, csn, json] file extension.',
SPECIFY_INPUT_FILE: 'Specify an input file that exists.',
SPECIFY_OUTPUT_FILE: 'Specify an output file or correct the output file path provided.',
MISSING_ENTITY_CONTAINER: 'There is no entity container in the OData model. Specify the correct OData model.',
MISSING_ENTITY_SETS: 'There are no entity sets in the OData model. Specify the correct OData model.',
INVALID_INPUT_FILE: 'Input file provided is not valid. Please provide a valid file with either .edmx, .xml extension for OData or .json extension for OpenAPI.',
FILE_MODIFIED: 'The file with the same name exists and is been modified. Use --force flag to forcefully overwrite the file.',
OUTPUT_FILE_MISMATCH: 'Specify the file extension that --as option supports.',
INVALID_AS_OPTION: 'For --as option, please specify one of these output file format [cds, csn, json].',
UNSUPPORTED_FROM_OPTION: 'For --from option, please specify one of these types [edmx, openapi, asyncapi, rfc]. Make sure the required importer plugin is installed.',
INCORRECT_EXTENSION: 'If --as option is not provided, then please provide either .json or .csn output file extension.',
INCORRECT_INPUT_NAMESPACES: 'Invalid value for --include-namespaces option. Specify namespaces as comma-separated list or "*"',
MISSING_ASSOCIATION: 'Association is missing in the input file provided. Please check the edmx file.',
COLLECTION_IN_KEY: 'Key Property of an Entity cannot be of the type Collection.',
INVALID_OPENAPI_FILE: 'The OpenAPI file is not valid. Specify the correct OpenAPI file.',
INVALID_ASYNCAPI_FILE: 'The AsyncAPI file is not valid. Specify the correct AsyncAPI file.',
INVALID_MESSAGE_NAME: 'The message name is not valid.',
UNRESOLVED_TYPE: 'Could not resolve the type: ',
NO_RETURN_TYPE: 'No ReturnType found in Function: ',
INVALID_ENUM_TYPE: 'The Underlying type provided is not supported for the EnumType: ',
INVALID_BOUND_PARAM_TYPE: 'Parameter Type of Bound Action/Function should not refer to an Entity in another Schema.',
UNBOUND_ACTION_COLLISION: 'Unbound Action does not support collision. Check the Action ',
BOUND_ACTION_COLLISION: 'The combination of Action name and binding parameter type must be unique for Bound Action ',
STREAM_NO_COLLECTION: `'Edm.Stream' cannot be of Collection type.`,
UNSUPPORTED_PROPERTY_TYPE: 'Property cannot be of EntityType. Check the type: ',
UNRESOLVED_SCHEMA_NAMESPACE: `Could not resolve the schema `,
INVALID_DATATYPE: `Invalid Data Type `,
ELEMENT_NAME_COLLISION: 'Collision between EntityContainer Element Name and Schema Element Name is currently not supported. Please check the element name: ',
NO_DEFAULT_FOR_COLLECTIONS: 'WARNING: Collection type cannot have a Default value.',
BINARY_MAXLENGTH: 'WARNING: MaxLength for type Edm.Binary should not exceed 5000.',
SCALE_GT_PRECISION: 'WARNING: Scale value should not be greater than Precision value.',
FIXED_PRECISION_VARIABLE_SCALE: 'WARNING: Fixed Precision with Variable or Floating Scale is not supported in CDS.',
NULLABLE_KEY: 'WARNING: Key element cannot be Nullable.',
COLLISION_DETECTED: `INFO: Element name collision detected. Adding suffix to affected type category.`,
INVALID_ANNOTATION: 'Annotation element must have a Term attribute',
DEPENDENCY_NOT_SUPPORTED: '--dependencies option is only supported for OData V4 files, not for other imports.',
};
function getMessages() {
return messages;
}
module.exports = {
getMessages
};