diff --git a/file-formats/srvd/README.md b/file-formats/srvd/README.md new file mode 100644 index 000000000..ddbb894d6 --- /dev/null +++ b/file-formats/srvd/README.md @@ -0,0 +1,14 @@ +# Service Definitions File Format + +## Object Type Information + +Object Type | Description | Group +:--- | :--- | :--- +SRVD | Service Definitions | Business Services + +## File Structure + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.srvd.json` | 1 | [`zif_aff_srvd_v1.intf.abap`](./type/zif_aff_srvd_v1.intf.abap) | [`srvd-v1.json`](./srvd-v1.json) | [`z_aff_example_srvd.srvd.json`](./examples/z_aff_example_srvd.srvd.json) +`.srvd.acds` | 1 | [CDS](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm) | | [`z_aff_example_srvd.srvd.acds`](./examples/z_aff_example_srvd.srvd.acds) diff --git a/file-formats/srvd/examples/z_aff_example_srvd.srvd.acds b/file-formats/srvd/examples/z_aff_example_srvd.srvd.acds new file mode 100644 index 000000000..60c36b6c2 --- /dev/null +++ b/file-formats/srvd/examples/z_aff_example_srvd.srvd.acds @@ -0,0 +1,4 @@ +@EndUserText.label: 'Example' +define service z_aff_example_srvd { + expose z_aff_example_ddls as myEntity; +} diff --git a/file-formats/srvd/examples/z_aff_example_srvd.srvd.json b/file-formats/srvd/examples/z_aff_example_srvd.srvd.json new file mode 100644 index 000000000..7dd4bb459 --- /dev/null +++ b/file-formats/srvd/examples/z_aff_example_srvd.srvd.json @@ -0,0 +1,11 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example", + "originalLanguage": "en" + }, + "generalInformation": { + "sourceOrigin": "abapDevelopmentTools", + "sourceType": "definition" + } +} diff --git a/file-formats/srvd/srvd-v1.json b/file-formats/srvd/srvd-v1.json new file mode 100644 index 000000000..feeacfd7f --- /dev/null +++ b/file-formats/srvd/srvd-v1.json @@ -0,0 +1,135 @@ +{ + "$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/srvd/srvd-v1.json", + "title": "Service Definition Properties", + "description": "Properties of a Service Definition", + "type": "object", + "properties": { + "formatVersion": { + "title": "ABAP File Format Version", + "description": "The ABAP file format version", + "type": "string", + "const": "1" + }, + "header": { + "title": "Header", + "description": "Header", + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "Description of the ABAP object", + "type": "string", + "maxLength": 60 + }, + "originalLanguage": { + "title": "Original Language", + "description": "Original language of the ABAP object", + "type": "string", + "minLength": 2 + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": [ + "standard", + "keyUser", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP for Key Users", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP for key user extensibility", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "generalInformation": { + "title": "General Information", + "description": "General information", + "type": "object", + "properties": { + "sourceOrigin": { + "title": "Source Origin", + "description": "Source Origin states which tool was used to create the service definition", + "type": "string", + "enum": [ + "abapDevelopmentTools", + "customCdsViews", + "customAnalyticalQueries", + "customBusinessObject", + "customCodeList", + "customCdsViewsVariantConfg", + "customFields", + "extensionsForDataSources", + "customSearchModeler", + "serviceConsumptionModel" + ], + "enumTitles": [ + "ABAP Development Tools", + "Custom CDS Views", + "Custom Analytical Queries", + "Custom Business Object", + "Custom Code List", + "Custom CDS Views for Variant Configurations", + "Custom Fields", + "Extensions for Data Sources", + "Custom Search Modeler", + "Service Consumption Model" + ], + "enumDescriptions": [ + "ABAP Development Tools", + "Custom CDS views", + "Custom analytical queries", + "Custom business object", + "Custom code list", + "Custom CDS views for variant configurations", + "Custom fields", + "Extensions for data sources", + "Custom search modeler", + "Service Consumption Model" + ], + "default": "abapDevelopmentTools" + }, + "sourceType": { + "title": "Source Type", + "description": "Source type states which statement is in the service definition.", + "type": "string", + "enum": [ + "definition", + "extension" + ], + "enumTitles": [ + "Definition", + "Extension" + ], + "enumDescriptions": [ + "Definition", + "Extension" + ], + "default": "definition" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "generalInformation" + ] +} diff --git a/file-formats/srvd/type/zif_aff_srvd_v1.intf.abap b/file-formats/srvd/type/zif_aff_srvd_v1.intf.abap new file mode 100644 index 000000000..b944decab --- /dev/null +++ b/file-formats/srvd/type/zif_aff_srvd_v1.intf.abap @@ -0,0 +1,96 @@ +INTERFACE zif_aff_srvd_v1 + PUBLIC. + + "!

Source Type

+ "! States which statement is used in the service definition + "! $values {@link zif_aff_srvd_v1.data:co_source_type} + "! $default {@link zif_aff_srvd_v1.data:co_source_type.definition} + TYPES ty_source_type TYPE c LENGTH 1. + + "!

Source Origin

+ "! States which tool was used to create the service definition + "! $values {@link zif_aff_srvd_v1.data:co_source_origin} + "! $default {@link zif_aff_srvd_v1.data:co_source_origin.abap_development_tools} + TYPES ty_source_origin TYPE c LENGTH 1. + + CONSTANTS: + "!

Source Type Values

+ "! Allowed values for source type + BEGIN OF co_source_type, + "!

Definition

+ "! Definition + definition TYPE ty_source_type VALUE 'S', + "!

Extension

+ "! Extension + extension TYPE ty_source_type VALUE 'X', + END OF co_source_type, + + "!

Source Origin Values

+ "! Allowed values for source origin + BEGIN OF co_source_origin, + "!

ABAP Development Tools

+ "! ABAP Development Tools + abap_development_tools TYPE ty_source_origin VALUE '0', + "!

Custom CDS Views

+ "! Custom CDS views + custom_cds_views TYPE ty_source_origin VALUE '1', + "!

Custom Analytical Queries

+ "! Custom analytical queries + custom_analytical_queries TYPE ty_source_origin VALUE '2', + "!

Custom Business Object

+ "! Custom business object + custom_business_object TYPE ty_source_origin VALUE '3', + "!

Custom Code List

+ "! Custom code list + custom_code_list TYPE ty_source_origin VALUE '4', + "!

Custom CDS Views for Variant Configurations

+ "! Custom CDS views for variant configurations + custom_cds_views_variant_confg TYPE ty_source_origin VALUE '5', + "!

Custom Fields

+ "! Custom fields + custom_fields TYPE ty_source_origin VALUE '6', + "!

Extensions for Data Sources

+ "! Extensions for data sources + extensions_for_data_sources TYPE ty_source_origin VALUE '7', + "!

Custom Search Modeler

+ "! Custom search modeler + custom_search_modeler TYPE ty_source_origin VALUE '8', + "!

Service Consumption Model

+ "! Service Consumption Model + service_consumption_model TYPE ty_source_origin VALUE '9', + END OF co_source_origin. + + + TYPES: + "!

General Information

+ "! Metadata for the service definition + BEGIN OF ty_general_information, + "!

Source Origin

+ "! Source Origin states which tool was used to create the service definition + "! $values {@link zif_aff_srvd_v1.data:co_source_origin} + "! $default {@link zif_aff_srvd_v1.data:co_source_origin.abap_development_tools} + source_origin TYPE ty_source_origin, + "!

Source Type

+ "! Source type states which statement is in the service definition. + "! $values {@link zif_aff_srvd_v1.data:co_source_type} + "! $default {@link zif_aff_srvd_v1.data:co_source_type.definition} + source_type TYPE ty_source_type, + END OF ty_general_information, + + "!

Service Definition Properties

+ "! Properties of a Service Definition + BEGIN OF ty_main, + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + "!

Header

+ "! Header + "! $required + header TYPE zif_aff_types_v1=>ty_header_60, + "!

General Information

+ "! General information + "! $required + general_information TYPE ty_general_information, + + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/srvd/type/zif_aff_srvd_v1.intf.json b/file-formats/srvd/type/zif_aff_srvd_v1.intf.json new file mode 100644 index 000000000..93deca88f --- /dev/null +++ b/file-formats/srvd/type/zif_aff_srvd_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "AFF type for SRVD objects", + "originalLanguage": "en" + } +}