@abitechdev/openchasqui-plugin-kit 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -7
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -1,12 +1,47 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/abitech-dev/abitech-openchasqui-cli#readme"><img alt="OpenChasqui" src="https://raw.githubusercontent.com/abitech-dev/abitech-openchasqui-cli/main/.github/assets/logo-light.svg" width="320"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# @abitechdev/openchasqui-plugin-kit
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@abitechdev/openchasqui-plugin-kit)
|
|
8
|
+
[](https://github.com/abitech-dev/abitech-openchasqui-cli/actions/workflows/ci.yml)
|
|
9
|
+
[](https://github.com/abitech-dev/abitech-openchasqui-cli/blob/main/LICENSE)
|
|
10
|
+
|
|
11
|
+
Utilidades para autores de plugins de OpenChasqui: resolver y aplanar esquemas, nombres de archivo seguros y valores de ejemplo para parámetros.
|
|
12
|
+
|
|
13
|
+
> **¿Solo quieres generar colecciones?** Instala el CLI,
|
|
14
|
+
> [`@abitechdev/openchasqui`](https://www.npmjs.com/package/@abitechdev/openchasqui), que ya incluye este paquete.
|
|
15
|
+
|
|
16
|
+
## Instalación
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm i @abitechdev/openchasqui-plugin-kit
|
|
20
|
+
pnpm add @abitechdev/openchasqui-plugin-kit
|
|
21
|
+
yarn add @abitechdev/openchasqui-plugin-kit
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Requiere Node.js 22 o superior.
|
|
25
|
+
|
|
26
|
+
## Uso
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { fileName, slugify } from "@abitechdev/openchasqui-plugin-kit";
|
|
30
|
+
|
|
31
|
+
slugify("Catálogos de Bancos"); // "catalogos-de-bancos"
|
|
32
|
+
fileName('Listar "bancos" / activos'); // "Listar -bancos- - activos"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
| Función | Qué hace |
|
|
36
|
+
| ----------------------------------------------- | ----------------------------------------------------------------- |
|
|
37
|
+
| `resolveSchema`, `inlineSchema`, `flattenAllOf` | Resuelven `$ref` y `allOf`; `inlineSchema` corta los ciclos |
|
|
38
|
+
| `slugify`, `fileName` | Nombres seguros para carpetas y archivos en cualquier sistema |
|
|
39
|
+
| `mostUsedScheme`, `parameterValue` | Esquema de seguridad más usado y valor de ejemplo de un parámetro |
|
|
40
|
+
|
|
41
|
+
## Documentación
|
|
4
42
|
|
|
5
|
-
|
|
6
|
-
([en español](https://github.com/abitech-dev/abitech-openchasqui-cli#readme)), which generates API collections from
|
|
7
|
-
OpenAPI. Most projects only need the command line,
|
|
8
|
-
[`@abitechdev/openchasqui`](https://www.npmjs.com/package/@abitechdev/openchasqui).
|
|
43
|
+
[Español](https://github.com/abitech-dev/abitech-openchasqui-cli#readme) · [English](https://github.com/abitech-dev/abitech-openchasqui-cli/blob/main/README.en.md)
|
|
9
44
|
|
|
10
|
-
##
|
|
45
|
+
## Licencia
|
|
11
46
|
|
|
12
|
-
Apache-2.0
|
|
47
|
+
[Apache-2.0](https://github.com/abitech-dev/abitech-openchasqui-cli/blob/main/LICENSE). Parte de [OpenChasqui](https://github.com/abitech-dev/abitech-openchasqui-cli).
|
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abitechdev/openchasqui-plugin-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Schema and naming helpers shared by OpenChasqui plugins.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"openapi",
|
|
7
|
+
"json-schema",
|
|
8
|
+
"plugin",
|
|
9
|
+
"helpers",
|
|
10
|
+
"openchasqui"
|
|
11
|
+
],
|
|
5
12
|
"license": "Apache-2.0",
|
|
6
13
|
"type": "module",
|
|
7
14
|
"exports": {
|
|
@@ -24,6 +31,6 @@
|
|
|
24
31
|
"directory": "packages/plugin-kit"
|
|
25
32
|
},
|
|
26
33
|
"dependencies": {
|
|
27
|
-
"@abitechdev/openchasqui-spec": "^0.1.
|
|
34
|
+
"@abitechdev/openchasqui-spec": "^0.1.1"
|
|
28
35
|
}
|
|
29
36
|
}
|