Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/pr_validation_caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# =========================================================================================
# CAMARA Project - Pull Request Validation Workflow Caller
#
# This GitHub Actions workflow is responsible for invoking a reusable PR validation workflow
# from the camaraproject/tooling repository. It is intended to ensure consistent validation
# steps for all PRs targeting the main branch in this repository.
#
# CHANGELOG:
# - 2025-08-01: Initial version for v0
#
# USAGE:
# - Automatically triggers on pull requests targeting main.
# - Can be triggered manually via workflow_dispatch.
# - Calls by default the reusable workflow at
# camaraproject/tooling/.github/workflows/pr_validation.yml@v0
#
# DOCUMENTATION:
# see https://github.com/camaraproject/tooling/tree/main/linting/docs
# =========================================================================================

name: Caller for PR validation workflow

on:
# Trigger on pull requests to the main branch only
pull_request:
branches: main
# Enable manual trigger via the GitHub UI
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
# Grant necessary write permissions for PRs, contents, and issues
pull-requests: write
contents: write
issues: write
statuses: write

jobs:
pr_validation:
# Invoke the reusable PR validation workflow from "v0" tag of camaraproject/tooling
uses: camaraproject/tooling/.github/workflows/pr_validation.yml@v0
secrets: inherit
# Tools configuration from the tooling repository subfolder of /linting/config/ indicated by `configurations` variable
# If needed, you can specify a configuration from another subfolder of camaraproject/tooling/linting/config/ (uncomment below)
# with:
# configurations: api-name
42 changes: 42 additions & 0 deletions .github/workflows/spectral-oas-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# =========================================================================================
# CAMARA Project - Linting OpenAPI Specification with CAMARA Ruleset Caller
#
# This GitHub Actions workflow is responsible for invoking a reusable "Spectral linting with
# CAMARA ruleset" workflow from the camaraproject/tooling repository. It is intended to
# provide more detailed output from Spectral tool (warnings, hints)
#
# CHANGELOG:
# - 2025-08-01: Initial version for v0
#
# USAGE:
# - Can be triggered manually via workflow_dispatch.
# - Calls by default the reusable workflow at
# camaraproject/tooling/.github/workflows/spectral-oas.yml@v0
#
# DOCUMENTATION:
# see https://github.com/camaraproject/tooling/tree/main/linting/docs
# =========================================================================================

name: Caller for Spectral linting with CAMARA ruleset

on:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
# Grant necessary write permissions for PRs and issues
pull-requests: write
contents: read
issues: write

jobs:
spectral:
# Invoke the reusable PR validation workflow from the main branch of camaraproject/tooling
uses: camaraproject/tooling/.github/workflows/spectral-oas.yml@v0
# Spectral configuration from the tooling repository subfolder of /linting/config/ indicated by `configurations` variable
# If needed, you can specify a configuration from another subfolder of camaraproject/tooling/linting/config/ (uncomment below)
# with:
# configurations: api-name
19 changes: 9 additions & 10 deletions code/API_definitions/device-swap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ info:

# Introduction

The Device Swap API performs real-time checks on the last Device Swap event, providing real-time information about whether the SIM card associated with a user's phone number has been transferred to a different physical device.
The Device Swap API performs real-time checks on the last Device Swap event, providing real-time information about whether the SIM card associated with a user's phone number has been transferred to a different physical device.

Device Swap information can be invaluable for enhancing security, fraud detection, and ensuring compliance with regulatory requirements in various applications, apart from providing useful information of device upgrade trends in user segments.

Expand All @@ -22,7 +22,7 @@ info:
# API Functionality

The Device Swap API provides a programmable interface for developers and other users (capabilities consumers) to request the last date of a device swap performed on the mobile line, or, to check whether a device swap has been performed during a past period.

The API provides 2 operations:

- POST retrieve-date: Provides timestamp of latest device swap, if any, for a given phone number.
Expand Down Expand Up @@ -81,7 +81,7 @@ tags:
description: Receive the last date in which the device of the end-user was swapped
- name: Check Device Swap
description: Validate if the SIM of the end-user has been installed in a different device during a past period
paths:
paths:
/retrieve-date:
post:
tags:
Expand All @@ -91,9 +91,9 @@ paths:
operationId: retrieveDeviceSwapDate
security:
- openId:
- device-swap
- device-swap
- openId:
- device-swap:retrieve-date
- device-swap:retrieve-date
parameters:
- $ref: '#/components/parameters/x-correlator'
requestBody:
Expand Down Expand Up @@ -145,9 +145,9 @@ paths:
operationId: checkDeviceSwap
security:
- openId:
- device-swap
- device-swap
- openId:
- device-swap:check
- device-swap:check
parameters:
- $ref: '#/components/parameters/x-correlator'
requestBody:
Expand Down Expand Up @@ -268,7 +268,7 @@ components:
description: Code given to this error
message:
type: string
description: Detailed error description
description: Detailed error description
responses:
Generic400:
description: Bad Request
Expand All @@ -288,8 +288,7 @@ components:
message: Client specified an invalid argument, request body or query param.
Generic400Check:
description: |-
Bad Request

Bad Request
In addition to regular scenario of INVALID_ARGUMENT, other scenarios may exist:
- Out of Range. Specific Syntax Exception used when a given field has a pre-defined range or a invalid filter criteria combination is requested ("code": "OUT_OF_RANGE","message": "Client specified an invalid range.")
headers:
Expand Down
Loading