From 2e52bfe2982afb45762a01a259a63c895e802707 Mon Sep 17 00:00:00 2001 From: Simone Esposito Date: Tue, 2 Jul 2024 11:48:09 +0200 Subject: [PATCH] Sostituzione. --- README.en.md | 14 +++++++------- README.md | 16 ++++++++-------- package.json | 2 +- public/initial.yaml | 4 ++-- src/components/Header.js | 4 ++-- src/components/ValidationController.js | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.en.md b/README.en.md index aee8ea12..ee7a679c 100644 --- a/README.en.md +++ b/README.en.md @@ -1,16 +1,16 @@ -# APIs validator compliant to the Italian Interoperability Framework +# APIs checker compliant to the Italian Interoperability Framework [![Join the #api channel](https://img.shields.io/badge/Slack-%23api-blue.svg?logo=slack)](https://developersitalia.slack.com/messages/CDKBYTG74) [![API on forum.italia.it](https://img.shields.io/badge/Forum-interoperabilit%C3%A0-blue.svg)](https://forum.italia.it/c/piano-triennale/interoperabilita) -This repository contains an in-browser validator that verifies some of the rules for the REST APIs, as indicated in the Interoperability Model. +This repository contains an in-browser checker that verifies some of the rules for the REST APIs, as indicated in the Interoperability Model. The associated projects are indicated in the [API Starter Kit](https://github.com/teamdigitale/api-starter-kit). There's a Beta [github-action that uses these rules](https://github.com/teamdigitale/api-oas-checker-action). The ready-to-use online application is available [here](https://teamdigitale.github.io/api-oas-checker). -The validator is based on [Spectral](https://github.com/stoplightio/spectral). +The checker is based on [Spectral](https://github.com/stoplightio/spectral). We preferred it because it does not require databases or server components to process your OpenAPI documents (OAS Checker is a github pages static application), @@ -18,7 +18,7 @@ and because the vast majority of ruleset can be described via static files (e.g. [except for very specific cases](security/functions/) you don't need to execute javascript code. Moreover, uses that do not trust sourcing javascript code, can just limit themself to static rules. -Other good validators we evaluated are: +Other good checkers we evaluated are: - [Zally](https://github.com/zalando/zally) requires a database and cannot be webpackaged in a browser application; - [Speccy](https://github.com/wework/speccy) seem to support only javascript rules, while our rules are usually described using static YAML files. @@ -42,7 +42,7 @@ $ spectral lint -r https://italia.github.io/api-oas-checker/spectral.yml $OAS_UR ## CI Mode (versioned rulesets) -When embedding the validator in a CI, you may want to use a specific version of the rules instead of the latest one. +When embedding the checker in a CI, you may want to use a specific version of the rules instead of the latest one. version of the rules instead of the latest one. In this case, you can refer to tags prefixed with `rules/X.Y.Z` (e.g. `rules/0.3.3`). @@ -53,7 +53,7 @@ $ spectral lint -r https://raw.githubusercontent.com/italia/api-oas-checker/rule ## IDE mode Some IDEs support Spectral via extensions. -Here are the steps to use the complete validation profile +Here are the steps to use the complete checking profile with [the official Spectral extension for Visual Studio Code](https://github.com/stoplightio/vscode-spectral): ```bash @@ -137,7 +137,7 @@ that the spectral output corresponds to that indicated in the associated `.snaps ./test-ruleset.sh rules problem ``` -Therefore, when editing a rule, it is necessary to recreate and validate the contents of the snapshot +Therefore, when editing a rule, it is necessary to recreate and check the contents of the snapshot with ```bash diff --git a/README.md b/README.md index 21b1a0e9..3e210734 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Validatore per API conformi al Modello di Interoperabilità +# Checker per API conformi al Modello di Interoperabilità [![Join the #api channel](https://img.shields.io/badge/Slack-%23api-blue.svg?logo=slack)](https://developersitalia.slack.com/messages/CDKBYTG74) [![API on forum.italia.it](https://img.shields.io/badge/Forum-interoperabilit%C3%A0-blue.svg)](https://forum.italia.it/c/piano-triennale/interoperabilita) [![README in English](https://img.shields.io/badge/Readme-English-darkgreen.svg)](README.en.md) -💡 Questo repository contiene un validatore in-browser che verifica alcune delle regole per le API REST indicate nel Modello di Interoperabilità. +💡 Questo repository contiene un checker in-browser che verifica alcune delle regole per le API REST indicate nel Modello di Interoperabilità. 🗂️ I progetti associati sono indicati nell'[API Starter Kit](https://github.com/teamdigitale/api-starter-kit). 👨🏻‍💻 L'applicazione on-line pronta all'uso è disponibile [qui](https://italia.github.io/api-oas-checker/). -⚙️ Il validatore è basato su [Spectral](https://github.com/stoplightio/spectral). +⚙️ Il checker è basato su [Spectral](https://github.com/stoplightio/spectral). > ### Perché Spectral? 🤔 > Lo abbiamo preferito rispetto ad altri software perché @@ -19,7 +19,7 @@ non richiede l'utilizzo di database o componenti server a cui inviare i tuoi doc > > Le alternative valutate, ugualmente valide, sono: > - [Zally](https://github.com/zalando/zally) ha bisogno di un database e non è possibile farne un webpackage; -> - [Speccy](https://github.com/wework/speccy) pare supportare solo regole in JavaScript, mentre questo validatore utilizza per lo più dei file YAML statici. +> - [Speccy](https://github.com/wework/speccy) pare supportare solo regole in JavaScript, mentre questo checker utilizza per lo più dei file YAML statici. ## 📦 Contenuto @@ -33,11 +33,11 @@ non richiede l'utilizzo di database o componenti server a cui inviare i tuoi doc La gestione delle regole è esterna: la cartella `rules-modi` punta, infatti, al repo [api-oas-checker-rules](https://github.com/italia/api-oas-checker-rules). -## 🔍 Validare le API +## 🔍 Eseguire il check delle API -Il modo più semplice per controllare un'API è di utilizzare la versione web di questo validatore, inserendo il contenuto dell'API e selezionando un set di regole. Sarà, quindi, possibile esaminare tutti gli errori, warning, info e hint rilevati da Spectral. +Il modo più semplice per controllare un'API è di utilizzare la versione web di questo checker, inserendo il contenuto dell'API e selezionando un set di regole. Sarà, quindi, possibile esaminare tutti gli errori, warning, info e hint rilevati da Spectral. -In alternativa, è possibile validare le API tramite IDE, CLI e GitHub Action: si rimanda al seguente [README](https://github.com/italia/api-oas-checker-rules/blob/main/README.md) del repo [api-oas-checker-rules](https://github.com/italia/api-oas-checker-rules) per tutte le informazioni. +In alternativa, è possibile fare il check delle API tramite IDE, CLI e GitHub Action: si rimanda al seguente [README](https://github.com/italia/api-oas-checker-rules/blob/main/README.md) del repo [api-oas-checker-rules](https://github.com/italia/api-oas-checker-rules) per tutte le informazioni. ## 🚀 Avviare la web app in locale @@ -69,7 +69,7 @@ Questo comando testa le regole presenti nel file `problem.yml` contenuto nella d ./test-ruleset.sh rules-modi/rules problem ``` -Quando si modifica una regola, è necessario ricreare e validare il contenuto della snapshot con: +Quando si modifica una regola, è necessario ricreare e rifare il check del contenuto della snapshot con: ```bash ./test-ruleset.sh rules-modi/rules --snapshot problem diff --git a/package.json b/package.json index f2f4c7ba..dc91b8df 100644 --- a/package.json +++ b/package.json @@ -82,5 +82,5 @@ "start": "make rules && webpack serve", "test": "jest" }, - "version": "0.5.2" + "version": "0.6" } diff --git a/public/initial.yaml b/public/initial.yaml index e1998698..fb39bedb 100644 --- a/public/initial.yaml +++ b/public/initial.yaml @@ -3,7 +3,7 @@ # the one based on the Italian Guidelines (default) # the one with some basic Security checks. -# Paste here your OAS spec and click on "Validate" +# Paste here your OAS spec and click on "Check" # or download them from the internet and click on "From url" # then fix them directly in the editor. @@ -12,5 +12,5 @@ # quello basato sul Modello d'Interoperabilità di AgID (default) # e quello che include una serie preliminare di controlli di sicurezza. # -# Incolla qui le tue specifiche OpenAPI e clicca su "Validate" +# Incolla qui le tue specifiche OpenAPI e clicca su "Check" # oppure scaricale cliccando su "From url" e correggile direttamente nell'editor \ No newline at end of file diff --git a/src/components/Header.js b/src/components/Header.js index b8aa5b86..43eaaca4 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -86,10 +86,10 @@ export const Header = () => {
it logo checker logo - Italian OpenAPI Validation Checker + Italian OpenAPI Checker {/* eslint-disable-next-line no-undef */} - Beta {VERSION} + {VERSION} {/* eslint-disable-next-line no-undef */} diff --git a/src/components/ValidationController.js b/src/components/ValidationController.js index 66a15de7..f12533ef 100644 --- a/src/components/ValidationController.js +++ b/src/components/ValidationController.js @@ -96,7 +96,7 @@ ${event.data.error}`); tag="button" onClick={validationInProgress ? Function.prototype : handleValidation} > - {validationInProgress ? 'Please wait...' : 'Validate'} + {validationInProgress ? 'Please wait...' : 'Check'}