@meshery/schemas 1.0.4 → 1.0.6
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 +12 -20
- package/dist/cloudApi.d.mts +3982 -3542
- package/dist/cloudApi.d.ts +3982 -3542
- package/dist/cloudApi.js +1 -1
- package/dist/cloudApi.mjs +1 -1
- package/dist/constructs/v1alpha3/relationship/RelationshipSchema.js +1 -1
- package/dist/constructs/v1alpha3/relationship/RelationshipSchema.mjs +1 -1
- package/dist/constructs/v1beta1/credential/CredentialSchema.js +4 -4
- package/dist/constructs/v1beta1/credential/CredentialSchema.mjs +4 -4
- package/dist/constructs/v1beta1/environment/EnvironmentSchema.js +1 -1
- package/dist/constructs/v1beta1/environment/EnvironmentSchema.mjs +1 -1
- package/dist/constructs/v1beta1/evaluation/EvaluationSchema.js +4 -4
- package/dist/constructs/v1beta1/evaluation/EvaluationSchema.mjs +4 -4
- package/dist/constructs/v1beta1/feature/FeatureSchema.js +1 -1
- package/dist/constructs/v1beta1/feature/FeatureSchema.mjs +1 -1
- package/dist/constructs/v1beta1/pattern/Pattern.d.mts +0 -160
- package/dist/constructs/v1beta1/pattern/Pattern.d.ts +0 -160
- package/dist/constructs/v1beta1/pattern/PatternSchema.js +13 -13
- package/dist/constructs/v1beta1/pattern/PatternSchema.mjs +13 -13
- package/dist/constructs/v1beta1/view/View.d.mts +674 -0
- package/dist/constructs/v1beta1/view/View.d.ts +674 -0
- package/dist/constructs/v1beta1/view/View.js +1 -0
- package/dist/constructs/v1beta1/view/View.mjs +0 -0
- package/dist/constructs/v1beta1/view/ViewSchema.d.mts +7 -0
- package/dist/constructs/v1beta1/view/ViewSchema.d.ts +7 -0
- package/dist/constructs/v1beta1/view/ViewSchema.js +2 -0
- package/dist/constructs/v1beta1/view/ViewSchema.mjs +2 -0
- package/dist/constructs/v1beta1/workspace/Workspace.d.mts +61 -19
- package/dist/constructs/v1beta1/workspace/Workspace.d.ts +61 -19
- package/dist/constructs/v1beta1/workspace/WorkspaceSchema.js +5 -5
- package/dist/constructs/v1beta1/workspace/WorkspaceSchema.mjs +5 -5
- package/dist/constructs/v1beta2/design/Design.d.mts +0 -168
- package/dist/constructs/v1beta2/design/Design.d.ts +0 -168
- package/dist/constructs/v1beta2/design/DesignSchema.js +13 -13
- package/dist/constructs/v1beta2/design/DesignSchema.mjs +13 -13
- package/dist/constructs/v1beta2/relationship/RelationshipSchema.js +1 -1
- package/dist/constructs/v1beta2/relationship/RelationshipSchema.mjs +1 -1
- package/dist/index.js +33 -33
- package/dist/index.mjs +33 -33
- package/dist/mesheryApi.d.mts +7612 -2453
- package/dist/mesheryApi.d.ts +7612 -2453
- package/dist/mesheryApi.js +1 -1
- package/dist/mesheryApi.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -689,18 +689,11 @@ models/v1alpha1/capability/capability.go
|
|
|
689
689
|
|
|
690
690
|
The OpenAPI bundle is passed to a codegen tool to generate RTK Query clients. Include relevant paths using `x-internal` annotations and define request/response schemas appropriately.
|
|
691
691
|
|
|
692
|
-
You can
|
|
692
|
+
You can build the OpenAPI bundles with:
|
|
693
693
|
|
|
694
694
|
```bash
|
|
695
|
-
#
|
|
696
|
-
|
|
697
|
-
"${v1beta1}/pattern/${merged_construct}" \
|
|
698
|
-
"${v1beta1}/component/${merged_construct}" \
|
|
699
|
-
"${v1beta1}/model/${merged_construct}" \
|
|
700
|
-
... \
|
|
701
|
-
-o _openapi_build/merged_openapi.yml \
|
|
702
|
-
--prefix-tags-with-info-prop title \
|
|
703
|
-
--prefix-components-with-info-prop title
|
|
695
|
+
# Build per-construct bundles, merge them, and emit cloud/meshery OpenAPI specs
|
|
696
|
+
make bundle-openapi
|
|
704
697
|
```
|
|
705
698
|
|
|
706
699
|
# Using Generated RTK Query Clients
|
|
@@ -884,15 +877,15 @@ Validate your schema updates before committing by running:
|
|
|
884
877
|
make build
|
|
885
878
|
```
|
|
886
879
|
|
|
887
|
-
|
|
880
|
+
For repository validation checks:
|
|
888
881
|
|
|
889
882
|
```bash
|
|
890
|
-
|
|
883
|
+
make validate-schemas
|
|
891
884
|
```
|
|
892
885
|
|
|
893
886
|
### Schema Validation Modes
|
|
894
887
|
|
|
895
|
-
`
|
|
888
|
+
The `validation/` Go package (invoked via `go run ./cmd/validate-schemas`) enforces 41 rules organized into four issue tiers. Different `make` targets control which tiers are visible and whether violations block the build.
|
|
896
889
|
|
|
897
890
|
| Mode | Command | Blocking | Style | Design | Contract |
|
|
898
891
|
| --- | --- | --- | --- | --- | --- |
|
|
@@ -904,14 +897,14 @@ npx @redocly/cli lint schemas/constructs/v1beta1/pattern/api.yml
|
|
|
904
897
|
| Strict CI gate | `make validate-schemas-strict` | Exit 1 | Error | Error | Error |
|
|
905
898
|
|
|
906
899
|
- **Blocking** (Rules 1-2, 5, 11-22, 27, 32-33): Always enforced. Break code generation or violate structural contracts.
|
|
907
|
-
- **Style** (Rules 3-4, 6-10, 19): Naming conventions. Silent by default; visible with `--style-debt`; blocking
|
|
900
|
+
- **Style** (Rules 3-4, 6-10, 19): Naming conventions. Silent by default; visible with `--style-debt`; blocking with `--strict-consistency`.
|
|
908
901
|
- **Design** (Rules 23-26, 30-31): API design patterns. Visible as advisories in `--warn` mode.
|
|
909
902
|
- **Contract** (Rules 28-29): Published API contract checks (response codes, duplicate schemas). Visible as advisories in `--warn` mode.
|
|
910
903
|
|
|
911
904
|
Run unit tests for the validation logic:
|
|
912
905
|
|
|
913
906
|
```bash
|
|
914
|
-
|
|
907
|
+
go test ./validation/...
|
|
915
908
|
```
|
|
916
909
|
|
|
917
910
|
### Build Pipeline
|
|
@@ -922,12 +915,12 @@ npm run test:validate-schemas
|
|
|
922
915
|
schemas/constructs/ (OpenAPI YAML source files)
|
|
923
916
|
|
|
|
924
917
|
v
|
|
925
|
-
[1] validate-schemas
|
|
926
|
-
|
|
|
918
|
+
[1] validate-schemas go run ./cmd/validate-schemas
|
|
919
|
+
| 41 rules: casing, dual-schema, templates, pagination
|
|
927
920
|
v
|
|
928
921
|
[2] bundle-openapi node build/bundle-openapi.js
|
|
929
|
-
| Per-construct:
|
|
930
|
-
| Merge all:
|
|
922
|
+
| Per-construct: in-repo dereference to merged-openapi.json
|
|
923
|
+
| Merge all: in-repo prefixing merge → merged_openapi.yml
|
|
931
924
|
| Filter: cloud_openapi.yml, meshery_openapi.yml
|
|
932
925
|
v
|
|
933
926
|
[3] generate-golang node build/generate-golang.js
|
|
@@ -977,7 +970,6 @@ The **property name is the single source of truth** for the json wire format. oa
|
|
|
977
970
|
| Build TypeScript dist | `npm run build` |
|
|
978
971
|
| Generate Go code only | `make golang-generate` |
|
|
979
972
|
| Generate TS types + schemas | `make generate-ts` |
|
|
980
|
-
| Lint OpenAPI | `npx @redocly/cli lint` |
|
|
981
973
|
| Schema validation (blocking) | `make validate-schemas` |
|
|
982
974
|
| Schema audit (advisory) | `make audit-schemas` |
|
|
983
975
|
| Full schema debt report | `make audit-schemas-debt-full` |
|