Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
bigludo7 authored Mar 4, 2024
2 parents 386e3fe + c071fc6 commit ee1d53d
Show file tree
Hide file tree
Showing 14 changed files with 1,179 additions and 45 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,51 @@

## Table of Contents

- [v0.3.0](#v030)
- [v0.2.0](#v020)
- [v0.1.0 - Initial version](#v010---initial-version)

# v0.3.0

**This version introduces API Testing Guidelines and initial linting ruleset and other changes to documents and artifacts approved since v0.2.0.**

## Please note:
The content of the release includes:
* Commonalities approved deliverables in **[documentation](https://github.com/camaraproject/Commonalities/tree/release-0.3.0/documentation)** folder
- **New:**
- [API Testing Guidelines](https://github.com/camaraproject/Commonalities/blob/release-0.3.0/documentation/API-Testing-Guidelines.md)
- [API Linting Rules](https://github.com/camaraproject/Commonalities/blob/release-0.3.0/documentation/Linting-rules.md)
- [OpenAPI Linting Rules Implementaion Guideline](https://github.com/camaraproject/Commonalities/blob/release-0.3.0/documentation/API-linting-Implementation-Guideline.md)
* Commonalities approved artifacts in **[artifacts](https://github.com/camaraproject/Commonalities/tree/release-0.3.0/artifacts)** folder
- **New:**
- [CAMARA_common.yaml](https://github.com/camaraproject/Commonalities/blob/release-0.3.0/artifacts/CAMARA_common.yaml)
- [Linting rules implementation files](https://github.com/camaraproject/Commonalities/tree/release-0.3.0/artifacts/linting_rules)

### Added
* API Testing Guidelines created by @shilpa-padgaonkar in https://github.com/camaraproject/Commonalities/pull/117
* API Design Guidelines updated with scopes naming guidelines by @jlurien in https://github.com/camaraproject/Commonalities/pull/57
* API Linting Rules - initial linting ruleset description by @rartych in https://github.com/camaraproject/Commonalities/pull/74
* API linting implementation and guidelines by @ravindrapalaskar17 in https://github.com/camaraproject/Commonalities/pull/110

### Changed
* CAMARA_common.yaml includes the following changes:
- CAMARA_common.json was changed to CAMARA_common.yaml to be consistent with all CAMARA API specs
- Includes guidance for info object
- Adds the aligned device schema updated by @shilpa-padgaonkar in https://github.com/camaraproject/Commonalities/pull/107

* X-Correlator header as required in OAS definition, X-Version removed from API Design Guidelines by @jlurien in https://github.com/camaraproject/Commonalities/pull/115
* Filtering criteria in API Design Guidelines changed by @RubenBG7 in https://github.com/camaraproject/Commonalities/pull/132

### Fixed
* CAMARA_common.yaml - error response codes updated by @RubenBG7 in https://github.com/camaraproject/Commonalities/pull/124
* API Design Guidelines updated on response filtering by @rartych in https://github.com/camaraproject/Commonalities/pull/123

### Removed
* API-exposure-reference-solution.docx removed from documentation/SupportingDocuments by @jordonezlucena in https://github.com/camaraproject/Commonalities/pull/104

**Full Changelog**: https://github.com/camaraproject/Commonalities/compare/v0.2.0...v0.3.0


# v0.2.0

**This version introduces CloudEvents format to CAMARA Events and other changes to documents and artifacts approved since v0.1.0.**
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/.

# These are the default owners for the whole content of this repository. The default owners are automatically added as reviewers when you open a pull request, unless different owners are specified in the file.
* @shilpa-padgaonkar @rartych @patrice-conil @RubenBG7 @jordonezlucena
* @shilpa-padgaonkar @rartych @patrice-conil @RubenBG7 @PedroDiez
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Repository to describe and document common guidelines and assets for CAMARA APIs

The documents that are relevant for CAMARA API Sub Projects are found in the `documentation` directory (at the top-level). The rest of the sub-directories are primarily for internal working of the Commonalities Working Group.

The `artifacts` directory contains templates for creating Github issues and Common data and error formats for CAMARA APIs.
The `artifacts` directory contains:
* templates for creating Github issues
* common data and error formats for CAMARA APIs in [CAMARA_common.yaml](artifacts/CAMARA_common.yaml)
* OAS definition of CAMARA Event using CloudEvents: [notification-as-cloud-event.yaml](artifacts/notification-as-cloud-event.yaml)

### Frequently-accessed output documents

Expand All @@ -32,20 +35,21 @@ A list of some of the frequently accessed documents that are an output of the wo
| [API-Readiness-Checklist.md](documentation/API-Readiness-Checklist.md) | A checklist that describes the minimum criteria for considering an API Ready |
| [Camara_Versioning_Guidelines.md](documentation/Camara_Versioning_Guidelines.md) | Guidelines for API Subprojects on making releases |
| [Glossary.md](documentation/Glossary.md) | A glossary of the common terms and their API parameter/field names for use in the APIs |

| [API-Testing-Guidelines.md](documentation/API-Testing-Guidelines.md) | Guidelines for the API testing in CAMARA project |



## Status and released versions
* Release 0.3.0 of guidelines and assets for CAMARA APIs is available within the [release-0.3.0 branch](https://github.com/camaraproject/Commonalities/tree/release-0.3.0):
* Release 0.2.0 of guidelines and assets for CAMARA APIs is available within the [release-0.2.0 branch](https://github.com/camaraproject/Commonalities/tree/release-0.2.0):
* Release 0.1.0 of guidelines and assets for CAMARA APIs is available within the [release-0.1.0 branch](https://github.com/camaraproject/Commonalities/tree/release-0.1.0):

For changes see [CHANGELOG.md](https://github.com/camaraproject/Commonalities/blob/main/CHANGELOG.md)

## Meetings
* Meetings are held virtually
* Schedule: bi-weekly, Monday, 4 PM CET/CEST (3 PM BST, 15:00 UTC)
* Meeting link: [MS Teams](https://teams.microsoft.com/l/meetup-join/19%3ameeting_M2E3ZmUxYWUtMDZkNi00YmM1LThiYWMtZjQzNWI0NWQxOGY0%40thread.v2/0?context=%7b%22Tid%22%3a%22bde4dffc-4b60-4cf6-8b04-a5eeb25f5c4f%22%2c%22Oid%22%3a%22a5cb7460-f2b0-42ec-b511-c642f83aa9a3%22%7d)
* Meetings are held virtually on the LF Platform: [Meeting Registration / Join](https://zoom-lfx.platform.linuxfoundation.org/meeting/91016460698?password=d031b0e3-8d49-49ae-958f-af3213b1e547)
* Schedule: bi-weekly, Monday, 4 PM CET/CEST (3 PM BST, 15:00 UTC). The date of the next meeting can be found in the previous [meeting minutes](https://wiki.camaraproject.org/display/CAM/2024+Commonalities+WG+Minutes).


## Contributorship and mailing list
* To subscribe / unsubscribe to the mailing list of this Sub Project and thus be / resign as Contributor please visit <https://lists.camaraproject.org/g/sp-com>.
Expand Down
78 changes: 78 additions & 0 deletions artifacts/linting_rules/.github/workflows/megalinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
# CAMARA Project - Github Action for Pull Reqests
# 31.01.2024 - initial version

name: MegaLinter

on: # yamllint disable-line rule:truthy
# Pull Requests to main
pull_request:
branches: [master, main]

env: # Comment env block if you do not want to apply fixes
# Apply linter fixes configuration
APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool)
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)

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

jobs:
build:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR
# Remove the ones you do not need
contents: write
issues: write
pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
- name: Install Spectral
run: npm install -g @stoplight/spectral
- name: Install Spectral functions
run: npm install -g @stoplight/spectral-functions
# - name: Run spectral:oas Spectral Linting
# run: spectral lint code/API_definitions/*.yaml --verbose --ruleset .spectral.yml
# Replace openapi.yaml file with your API specification file

# MegaLinter
- name: MegaLinter
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
uses: oxsecurity/megalinter/flavors/java@v7.3.0
env:
# All available variables are described in documentation
# https://megalinter.io/configuration/
PRINT_ALPACA: false
# VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
DISABLE: COPYPASTE,MARKDOWN
DISABLE_LINTERS: SPELL_CSPELL,SPELL_LYCHEE,YAML_PRETTIER,REPOSITORY_GRYPE, REPOSITORY_SEMGREP,REPOSITORY_DEVSKIM,REPOSITORY_KICS,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,REPOSITORY_CHECKOV,REPOSITORY_GITLEAKS,YAML_V8R,JAVA_PMD,JAVA_CHECKSTYLE
YAML_YAMLLINT_CONFIG_FILE: ".yamllint.yaml"
OPENAPI_SPECTRAL_CONFIG_FILE: ".spectral.yml"
YAML_YAMLLINT_FILTER_REGEX_INCLUDE: "(code/)"
OPENAPI_SPECTRAL_FILTER_REGEX_INCLUDE: "(code/)"

# Upload MegaLinter artifacts
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
36 changes: 36 additions & 0 deletions artifacts/linting_rules/.github/workflows/spectral_oas_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# CAMARA Project - workflow configuration to manually run CAMARA OAS rules
# see https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow
# 31.01.2024 - initial version

name: Spectral manual run

on: workflow_dispatch

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

jobs:
build:
name: Spectral linting
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR
# Remove the ones you do not need
contents: write
issues: write
pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
- name: Install Spectral
run: npm install -g @stoplight/spectral
- name: Install Spectral functions
run: npm install -g @stoplight/spectral-functions
- name: Run Spectral linting
run: spectral lint code/API_definitions/*.yaml --verbose --ruleset .spectral.yml
Loading

0 comments on commit ee1d53d

Please sign in to comment.