9.[**OpenCAPIF SDK full documentation**](./doc/sdk_full_documentation.md)
10.[OpenCAPIF SDK known issues](#opencapif-sdk-known-issues)
# Repository structure
@@ -136,10 +136,14 @@ A Network App development running as a Provider would typically follow this proc
Now, it is described in 4 simple steps how a Provider can be developed in just some code lines, below snippet. It describes the usual flow a Provider would follow to publish an API service.
@@ -169,6 +173,8 @@ Code is next explained step by step:
It is also important to have previously prepared the **API schema description** file of the API to be published. **This file must follow the [CAPIF_Publish_Service_API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) 3GPP specification.**
If the **API** is defined in an Openapi.yaml format, the sdk has a facility which creates automatically the **API schema description**.For using this functionality uncomment the translator lines. More information:[Translator functionality](./doc/sdk_full_documentation.md#openapi-translation)
Choose one APF and the AEF identifiers, and fulfill the `publish_req` structure and the `api_description_path`.
The `provider_capif_ids` variable is a dictionary which contains key-values of all the APFs and AEFs stored as name: ID.
@@ -69,6 +69,9 @@ This section is mandatory when using the [CAPIF Publish Service API](https://git
The `api_description_path` must point to the Publish API to be shared, and it should follow the [ServiceAPIDescription](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) schema.
To obtain this schema, opencapif_sdk has a facility to translate Openapi structures to ServiceAPIDescription schemas.
More information:[Translator functionality](./sdk_full_documentation.md#openapi-translation)
If the `publisher_aefs_ids` do not match the `aefProfiles` in the API description, an error will be raised by the SDK.
Currently, the OpenCAPIF SDK is only available by downloading this repository and performing a manual installation. In the future, an OpenCAPIF SDK package will be released for easier installation.
Before proceeding, ensure you have fulfilled the necessary [requirements](../README.md).
Before proceeding, ensure you have fulfilled the necessary [requirements](../README.md#opencapif-sdk-requirements).
Follow the steps below to install the OpenCAPIF SDK for development purposes:
## Prerequisites
## Requisites
- Developers must have the following tools installed:
@@ -48,6 +48,7 @@ As outlined in the [Network App developers section](../README.md), the OpenCAPIF
-[Check authentication](#check-authentication)
-[Update and Offboard Invoker](#update-and-offboard-invoker)
-[Other Features](#other-features)
-[Openapi translation](#openapi-translation)
-[CAPIF Registration and Login](#capif-registration-and-login)
-[CAPIF Deregistration and Logout](#capif-registration-and-login)
@@ -86,11 +87,17 @@ OpenCAPIF SDK references:
The SDK streamlines API publishing with the option to select specific APFs and AEFs. A copy of the uploaded API is stored in `capif_<api_name>_<api_id>.json`, and the `provider_capif_ids.json` is updated with the API name and its ID.
It is also important to have previously prepared the **API schema description** file of the API to be published. **This file must follow the [CAPIF_Publish_Service_API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) 3GPP specification.**
To obtain this schema, opencapif_sdk has a facility to translate Openapi structures to ServiceAPIDescription schemas.
More information:[Translator functionality](#openapi-translation)
**Important**: The SDK will automatically add in the `custom operations`, within the API description path, the capabilities for exposing the [AEF_security](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_AEF_Security_API.yaml) methods. The developer must code this API endpoints.
**Required SDK inputs**:
- publisher_apf_id
- publisher_aefs_ids
- api_description_path
### Service Deletion
@@ -230,6 +237,18 @@ Onboarding is required before utilizing these functions.
## Other Features
### Openapi translation
The `api_description_path` must point to the Publish API to be shared, and it should follow the [ServiceAPIDescription](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) schema.
This schema could be obtained by applying this code.
This code will read `openapi.yaml`, ensure the structure of it and translate the content into ServiceAPIDescription schema, then will create a .json named `api_description_name`. Also it is necessary to fill the ip and port fields to create correctly the schema.