@skmtc/core 0.48.0 → 0.49.0
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/esm/context/CoreContext.d.ts +1 -1
- package/esm/context/CoreContext.js +6 -2
- package/esm/context/GenerateContext.d.ts +1 -1
- package/esm/context/GenerateContext.js +1 -1
- package/esm/context/ParseContext.d.ts +4 -4
- package/esm/context/ParseContext.js +6 -6
- package/esm/context/generateTypes.d.ts +4 -4
- package/esm/context/tryParseAt.d.ts +1 -1
- package/esm/context/tryParseAt.js +1 -1
- package/esm/enrichments/EnrichmentAudit.d.ts +1 -1
- package/esm/enrichments/EnrichmentWarning.d.ts +1 -1
- package/esm/enrichments/findUnknownKeys.d.ts +1 -1
- package/esm/enrichments/findUnknownKeys.js +1 -1
- package/esm/enrichments/parseEnrichmentUmbrella.d.ts +1 -1
- package/esm/enrichments/parseEnrichmentUmbrella.js +1 -1
- package/esm/enrichments/parseEnrichmentValue.d.ts +2 -2
- package/esm/enrichments/parseEnrichmentValue.js +2 -2
- package/esm/enrichments/readEnrichments.d.ts +4 -4
- package/esm/enrichments/readEnrichments.js +4 -4
- package/esm/enrichments/validateConfig.d.ts +1 -1
- package/esm/helpers/applyGeneratedSuffix.d.ts +1 -1
- package/esm/helpers/applyGeneratedSuffix.js +1 -1
- package/esm/helpers/normalizeWorkspacePath.d.ts +1 -1
- package/esm/helpers/normalizeWorkspacePath.js +1 -1
- package/esm/oas/array/Array.d.ts +2 -2
- package/esm/oas/array/Array.js +2 -2
- package/esm/oas/boolean/Boolean.d.ts +2 -2
- package/esm/oas/boolean/Boolean.js +2 -2
- package/esm/oas/integer/Integer.d.ts +2 -2
- package/esm/oas/integer/Integer.js +2 -2
- package/esm/oas/intersection/Intersection.d.ts +3 -3
- package/esm/oas/intersection/Intersection.js +3 -3
- package/esm/oas/number/Number.d.ts +2 -2
- package/esm/oas/number/Number.js +2 -2
- package/esm/oas/object/Object.d.ts +2 -2
- package/esm/oas/object/Object.js +2 -2
- package/esm/oas/operation/Operation.d.ts +1 -1
- package/esm/oas/operation/Operation.js +1 -1
- package/esm/oas/operation/toEffectiveParameters.d.ts +2 -2
- package/esm/oas/operation/toEffectiveParameters.js +2 -2
- package/esm/oas/ref/DanglingRefError.d.ts +1 -1
- package/esm/oas/ref/DanglingRefError.js +1 -1
- package/esm/oas/ref/Ref.d.ts +2 -2
- package/esm/oas/ref/Ref.js +2 -2
- package/esm/oas/string/String.d.ts +2 -2
- package/esm/oas/string/String.js +2 -2
- package/esm/oas/union/Union.d.ts +3 -3
- package/esm/oas/union/Union.js +3 -3
- package/esm/oas/unknown/Unknown.d.ts +2 -2
- package/esm/oas/unknown/Unknown.js +2 -2
- package/esm/parse/allOfSystem.d.ts +4 -4
- package/esm/parse/allOfSystem.js +2 -2
- package/esm/parse/anyOfSystem.d.ts +5 -5
- package/esm/parse/anyOfSystem.js +4 -4
- package/esm/parse/keptRefs.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-union.d.ts +1 -1
- package/esm/parse/v3-0/_merge-all-of/merge-union.js +3 -3
- package/esm/parse/v3-0/_merge-all-of/merge.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/types.d.ts +4 -4
- package/esm/parse/v3-0/ref/toRefV31.js +1 -1
- package/esm/parse/v3-0/schema/toSchemasV3.js +3 -3
- package/esm/parse/v3-1/_merge-all-of/merge-union.d.ts +1 -1
- package/esm/parse/v3-1/_merge-all-of/merge-union.js +3 -3
- package/esm/parse/v3-1/_merge-all-of/merge.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/types.d.ts +4 -4
- package/esm/parse/v3-1/ref/toRefV31.js +1 -1
- package/esm/parse/v3-1/schema/toSchemasV3.js +3 -3
- package/esm/parse/v3-2/_merge-all-of/merge-union.d.ts +1 -1
- package/esm/parse/v3-2/_merge-all-of/merge-union.js +3 -3
- package/esm/parse/v3-2/_merge-all-of/merge.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/types.d.ts +4 -4
- package/esm/parse/v3-2/ref/toRefV31.js +1 -1
- package/esm/parse/v3-2/schema/toSchemasV3.js +3 -3
- package/esm/run/toEnrichmentDefaults.d.ts +1 -1
- package/esm/run/toEnrichmentDefaults.js +1 -1
- package/esm/types/EnrichmentDefaults.d.ts +1 -1
- package/esm/types/EnrichmentDefaults.js +1 -1
- package/esm/types/Enrichments.d.ts +1 -1
- package/esm/types/Manifest.d.ts +1 -1
- package/esm/types/ModuleSelect.d.ts +1 -1
- package/esm/types/Settings.d.ts +29 -11
- package/esm/types/Settings.js +13 -6
- package/esm/types/Variant.d.ts +3 -3
- package/esm/types/Variant.js +3 -3
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +1 -1
- package/script/context/CoreContext.js +6 -2
- package/script/context/GenerateContext.d.ts +1 -1
- package/script/context/GenerateContext.js +1 -1
- package/script/context/ParseContext.d.ts +4 -4
- package/script/context/ParseContext.js +6 -6
- package/script/context/generateTypes.d.ts +4 -4
- package/script/context/tryParseAt.d.ts +1 -1
- package/script/context/tryParseAt.js +1 -1
- package/script/enrichments/EnrichmentAudit.d.ts +1 -1
- package/script/enrichments/EnrichmentWarning.d.ts +1 -1
- package/script/enrichments/findUnknownKeys.d.ts +1 -1
- package/script/enrichments/findUnknownKeys.js +1 -1
- package/script/enrichments/parseEnrichmentUmbrella.d.ts +1 -1
- package/script/enrichments/parseEnrichmentUmbrella.js +1 -1
- package/script/enrichments/parseEnrichmentValue.d.ts +2 -2
- package/script/enrichments/parseEnrichmentValue.js +2 -2
- package/script/enrichments/readEnrichments.d.ts +4 -4
- package/script/enrichments/readEnrichments.js +4 -4
- package/script/enrichments/validateConfig.d.ts +1 -1
- package/script/helpers/applyGeneratedSuffix.d.ts +1 -1
- package/script/helpers/applyGeneratedSuffix.js +1 -1
- package/script/helpers/normalizeWorkspacePath.d.ts +1 -1
- package/script/helpers/normalizeWorkspacePath.js +1 -1
- package/script/oas/array/Array.d.ts +2 -2
- package/script/oas/array/Array.js +2 -2
- package/script/oas/boolean/Boolean.d.ts +2 -2
- package/script/oas/boolean/Boolean.js +2 -2
- package/script/oas/integer/Integer.d.ts +2 -2
- package/script/oas/integer/Integer.js +2 -2
- package/script/oas/intersection/Intersection.d.ts +3 -3
- package/script/oas/intersection/Intersection.js +3 -3
- package/script/oas/number/Number.d.ts +2 -2
- package/script/oas/number/Number.js +2 -2
- package/script/oas/object/Object.d.ts +2 -2
- package/script/oas/object/Object.js +2 -2
- package/script/oas/operation/Operation.d.ts +1 -1
- package/script/oas/operation/Operation.js +1 -1
- package/script/oas/operation/toEffectiveParameters.d.ts +2 -2
- package/script/oas/operation/toEffectiveParameters.js +2 -2
- package/script/oas/ref/DanglingRefError.d.ts +1 -1
- package/script/oas/ref/DanglingRefError.js +1 -1
- package/script/oas/ref/Ref.d.ts +2 -2
- package/script/oas/ref/Ref.js +2 -2
- package/script/oas/string/String.d.ts +2 -2
- package/script/oas/string/String.js +2 -2
- package/script/oas/union/Union.d.ts +3 -3
- package/script/oas/union/Union.js +3 -3
- package/script/oas/unknown/Unknown.d.ts +2 -2
- package/script/oas/unknown/Unknown.js +2 -2
- package/script/parse/allOfSystem.d.ts +4 -4
- package/script/parse/allOfSystem.js +2 -2
- package/script/parse/anyOfSystem.d.ts +5 -5
- package/script/parse/anyOfSystem.js +4 -4
- package/script/parse/keptRefs.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-union.d.ts +1 -1
- package/script/parse/v3-0/_merge-all-of/merge-union.js +3 -3
- package/script/parse/v3-0/_merge-all-of/merge.js +2 -2
- package/script/parse/v3-0/_merge-all-of/types.d.ts +4 -4
- package/script/parse/v3-0/ref/toRefV31.js +1 -1
- package/script/parse/v3-0/schema/toSchemasV3.js +3 -3
- package/script/parse/v3-1/_merge-all-of/merge-union.d.ts +1 -1
- package/script/parse/v3-1/_merge-all-of/merge-union.js +3 -3
- package/script/parse/v3-1/_merge-all-of/merge.js +2 -2
- package/script/parse/v3-1/_merge-all-of/types.d.ts +4 -4
- package/script/parse/v3-1/ref/toRefV31.js +1 -1
- package/script/parse/v3-1/schema/toSchemasV3.js +3 -3
- package/script/parse/v3-2/_merge-all-of/merge-union.d.ts +1 -1
- package/script/parse/v3-2/_merge-all-of/merge-union.js +3 -3
- package/script/parse/v3-2/_merge-all-of/merge.js +2 -2
- package/script/parse/v3-2/_merge-all-of/types.d.ts +4 -4
- package/script/parse/v3-2/ref/toRefV31.js +1 -1
- package/script/parse/v3-2/schema/toSchemasV3.js +3 -3
- package/script/run/toEnrichmentDefaults.d.ts +1 -1
- package/script/run/toEnrichmentDefaults.js +1 -1
- package/script/types/EnrichmentDefaults.d.ts +1 -1
- package/script/types/EnrichmentDefaults.js +1 -1
- package/script/types/Enrichments.d.ts +1 -1
- package/script/types/Manifest.d.ts +1 -1
- package/script/types/ModuleSelect.d.ts +1 -1
- package/script/types/Settings.d.ts +29 -11
- package/script/types/Settings.js +14 -7
- package/script/types/Variant.d.ts +3 -3
- package/script/types/Variant.js +3 -3
|
@@ -304,7 +304,7 @@ export declare class CoreContext {
|
|
|
304
304
|
* Seed-values sibling of {@link toSupportedSubjects}: parse the document, then
|
|
305
305
|
* call each generator's `toEnrichmentDefaults` over its supported subjects —
|
|
306
306
|
* no transform, no render. Returns the default enrichment values keyed by the
|
|
307
|
-
* `
|
|
307
|
+
* `skmtc.config.json#settings.enrichments` routing, plus parse issues. Fails open
|
|
308
308
|
* like {@link toArtifacts}: a bad schema surfaces as a `parseIssue` and the
|
|
309
309
|
* defaults map is returned empty.
|
|
310
310
|
*/
|
|
@@ -426,7 +426,7 @@ export class CoreContext {
|
|
|
426
426
|
* Seed-values sibling of {@link toSupportedSubjects}: parse the document, then
|
|
427
427
|
* call each generator's `toEnrichmentDefaults` over its supported subjects —
|
|
428
428
|
* no transform, no render. Returns the default enrichment values keyed by the
|
|
429
|
-
* `
|
|
429
|
+
* `skmtc.config.json#settings.enrichments` routing, plus parse issues. Fails open
|
|
430
430
|
* like {@link toArtifacts}: a bad schema surfaces as a `parseIssue` and the
|
|
431
431
|
* defaults map is returned empty.
|
|
432
432
|
*/
|
|
@@ -536,11 +536,15 @@ _CoreContext_phase = new WeakMap(), _CoreContext_results = new WeakMap(), _CoreC
|
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
}, _CoreContext_setupParsePhase = function _CoreContext_setupParsePhase(input, settings) {
|
|
539
|
+
if (settings?.parse && settings.system) {
|
|
540
|
+
this.logger.warn('settings.parse and settings.system are both set: settings.parse is used and settings.system is ignored. ' +
|
|
541
|
+
'settings.system is the deprecated name of settings.parse; remove it.');
|
|
542
|
+
}
|
|
539
543
|
const parseContext = new ParseContext({
|
|
540
544
|
input,
|
|
541
545
|
logger: this.logger,
|
|
542
546
|
silent: this.silent,
|
|
543
|
-
system: settings?.system
|
|
547
|
+
system: settings?.parse ?? settings?.system
|
|
544
548
|
});
|
|
545
549
|
return { type: 'parse', context: parseContext };
|
|
546
550
|
}, _CoreContext_setupGeneratePhase = function _CoreContext_setupGeneratePhase({ document, settings, toGeneratorConfigMap, captureChannel }) {
|
|
@@ -202,7 +202,7 @@ export declare class GenerateContext implements GenerateContextType {
|
|
|
202
202
|
* document — the *values* counterpart of {@link toSupportedSubjects}. For
|
|
203
203
|
* every generator that advertises `toEnrichmentDefaults`, calls it over the
|
|
204
204
|
* subjects the generator supports and keeps the non-`undefined` subject-scope
|
|
205
|
-
* leaves, keyed by the `
|
|
205
|
+
* leaves, keyed by the `skmtc.config.json#settings.enrichments` routing:
|
|
206
206
|
* `[id][path][method]['main']` for operations, `[id][refName]['main']` for
|
|
207
207
|
* models. Seeding targets the `'main'` variant; a generator that advertises
|
|
208
208
|
* no defaults (or whose every subject returns `undefined`) is omitted.
|
|
@@ -382,7 +382,7 @@ export class GenerateContext {
|
|
|
382
382
|
* document — the *values* counterpart of {@link toSupportedSubjects}. For
|
|
383
383
|
* every generator that advertises `toEnrichmentDefaults`, calls it over the
|
|
384
384
|
* subjects the generator supports and keeps the non-`undefined` subject-scope
|
|
385
|
-
* leaves, keyed by the `
|
|
385
|
+
* leaves, keyed by the `skmtc.config.json#settings.enrichments` routing:
|
|
386
386
|
* `[id][path][method]['main']` for operations, `[id][refName]['main']` for
|
|
387
387
|
* models. Seeding targets the `'main'` variant; a generator that advertises
|
|
388
388
|
* no defaults (or whose every subject returns `undefined`) is omitted.
|
|
@@ -72,7 +72,7 @@ type ConstructorArgs = {
|
|
|
72
72
|
options?: {
|
|
73
73
|
gql?: GqlParseOptions;
|
|
74
74
|
};
|
|
75
|
-
/** `
|
|
75
|
+
/** `skmtc.config.json#settings.parse`: how the OpenAPI parsers treat what they cannot read faithfully. */
|
|
76
76
|
system?: SystemSettings;
|
|
77
77
|
};
|
|
78
78
|
export declare class ParseContext {
|
|
@@ -90,7 +90,7 @@ export declare class ParseContext {
|
|
|
90
90
|
currentStackTrail: StackTrail | undefined;
|
|
91
91
|
/**
|
|
92
92
|
* How the OpenAPI parsers treat what they cannot read faithfully
|
|
93
|
-
* (`
|
|
93
|
+
* (`skmtc.config.json#settings.parse`). Each setting left out is `strict`.
|
|
94
94
|
*/
|
|
95
95
|
system: SystemSettings;
|
|
96
96
|
constructor({ input, logger, silent, options, system }: ConstructorArgs);
|
|
@@ -102,7 +102,7 @@ export declare class ParseContext {
|
|
|
102
102
|
get oasDocument(): OasDocument;
|
|
103
103
|
/** OAS-only accessor; symmetric reason to {@link oasDocument}. */
|
|
104
104
|
get documentObject(): OpenAPIV3.Document;
|
|
105
|
-
/** The refs of the document that a merge keeps as refs (`
|
|
105
|
+
/** The refs of the document that a merge keeps as refs (`parse.intersections`); `undefined` under `merge`. */
|
|
106
106
|
get keptRefs(): KeptRefs | undefined;
|
|
107
107
|
/** GQL-only accessor; throws if called on an OAS context. */
|
|
108
108
|
get schema(): GraphQLSchema;
|
|
@@ -180,7 +180,7 @@ export declare class ParseContext {
|
|
|
180
180
|
* What a merge reads in place of a `$ref` that names nothing: an `allOf`
|
|
181
181
|
* member, or in a `oneOf` or `anyOf`, a member's own `allOf` member or a
|
|
182
182
|
* member merged with the keywords beside the union. When
|
|
183
|
-
* `
|
|
183
|
+
* `parse.danglingRefs` lists `allOfMember`, it is `{}`, which
|
|
184
184
|
* adds nothing to the merge (`A & unknown` is `A`), and a `DANGLING_REF`
|
|
185
185
|
* warning at `stackTrail`: the model has no properties from that member.
|
|
186
186
|
* Otherwise it throws `DanglingRefError`, and what holds the `allOf` is
|
|
@@ -147,7 +147,7 @@ export class ParseContext {
|
|
|
147
147
|
});
|
|
148
148
|
/**
|
|
149
149
|
* How the OpenAPI parsers treat what they cannot read faithfully
|
|
150
|
-
* (`
|
|
150
|
+
* (`skmtc.config.json#settings.parse`). Each setting left out is `strict`.
|
|
151
151
|
*/
|
|
152
152
|
Object.defineProperty(this, "system", {
|
|
153
153
|
enumerable: true,
|
|
@@ -239,7 +239,7 @@ export class ParseContext {
|
|
|
239
239
|
}
|
|
240
240
|
return this.protocol.documentObject;
|
|
241
241
|
}
|
|
242
|
-
/** The refs of the document that a merge keeps as refs (`
|
|
242
|
+
/** The refs of the document that a merge keeps as refs (`parse.intersections`); `undefined` under `merge`. */
|
|
243
243
|
get keptRefs() {
|
|
244
244
|
__classPrivateFieldSet(this, _ParseContext_keptRefs, __classPrivateFieldGet(this, _ParseContext_keptRefs, "f") ?? {
|
|
245
245
|
value: toKeptRefs({ documentObject: this.documentObject, setting: this.system.intersections })
|
|
@@ -458,7 +458,7 @@ export class ParseContext {
|
|
|
458
458
|
* What a merge reads in place of a `$ref` that names nothing: an `allOf`
|
|
459
459
|
* member, or in a `oneOf` or `anyOf`, a member's own `allOf` member or a
|
|
460
460
|
* member merged with the keywords beside the union. When
|
|
461
|
-
* `
|
|
461
|
+
* `parse.danglingRefs` lists `allOfMember`, it is `{}`, which
|
|
462
462
|
* adds nothing to the merge (`A & unknown` is `A`), and a `DANGLING_REF`
|
|
463
463
|
* warning at `stackTrail`: the model has no properties from that member.
|
|
464
464
|
* Otherwise it throws `DanglingRefError`, and what holds the `allOf` is
|
|
@@ -471,7 +471,7 @@ export class ParseContext {
|
|
|
471
471
|
}
|
|
472
472
|
this.logIssueNoKey({
|
|
473
473
|
level: 'warning',
|
|
474
|
-
message: `${error.message}. It is left out of the allOf merge (
|
|
474
|
+
message: `${error.message}. It is left out of the allOf merge (parse.danglingRefs lists 'allOfMember').`,
|
|
475
475
|
parent: { $ref: error.ref },
|
|
476
476
|
stackTrail,
|
|
477
477
|
type: 'DANGLING_REF'
|
|
@@ -827,7 +827,7 @@ _ParseContext_refConsumers = new WeakMap(), _ParseContext_refErrors = new WeakMa
|
|
|
827
827
|
else if (this.system.danglingRefs?.includes(ref.refType)) {
|
|
828
828
|
this.logIssueNoKey({
|
|
829
829
|
level: 'warning',
|
|
830
|
-
message: `${error.message}. It is kept (
|
|
830
|
+
message: `${error.message}. It is kept (parse.danglingRefs lists '${ref.refType}'), and resolving it throws DanglingRefError.`,
|
|
831
831
|
parent: { $ref: ref.$ref },
|
|
832
832
|
stackTrail: consumer,
|
|
833
833
|
type: 'DANGLING_REF'
|
|
@@ -840,7 +840,7 @@ _ParseContext_refConsumers = new WeakMap(), _ParseContext_refErrors = new WeakMa
|
|
|
840
840
|
refTarget,
|
|
841
841
|
error,
|
|
842
842
|
type: 'DANGLING_REF',
|
|
843
|
-
message: `${error.message}, so what holds it is removed. To keep it, list '${ref.refType}' in
|
|
843
|
+
message: `${error.message}, so what holds it is removed. To keep it, list '${ref.refType}' in parse.danglingRefs.`
|
|
844
844
|
});
|
|
845
845
|
}
|
|
846
846
|
}
|
|
@@ -179,16 +179,16 @@ export type AnyOasDocument = OpenAPIV2.Document | OpenAPIV3.Document | OpenAPIV3
|
|
|
179
179
|
* non-JSON types (`multipart/form-data`, `text/plain`) logs nothing.
|
|
180
180
|
*
|
|
181
181
|
* `ALLOF_CONTRADICTION` (`warning`) — `allOf` members contradict, and
|
|
182
|
-
* `
|
|
182
|
+
* `parse.allOf: latestWins` kept the later member's keywords. One for each
|
|
183
183
|
* schema; the message names the keywords.
|
|
184
184
|
*
|
|
185
|
-
* `ANYOF_AS_UNKNOWN` (`warning`) — `
|
|
185
|
+
* `ANYOF_AS_UNKNOWN` (`warning`) — `parse.anyOf: unknown` read an `anyOf`
|
|
186
186
|
* of two or more members as any value. The schema keeps its other keywords.
|
|
187
187
|
* One for each schema.
|
|
188
188
|
*
|
|
189
189
|
* `DANGLING_REF` — a `$ref` names nothing in the document: no component has
|
|
190
190
|
* its name, or it is part of a loop of `$ref`s (`A` is a `$ref` to `B`, and
|
|
191
|
-
* `B` to `A`). One for each place the `$ref` is written. A `warning` when `
|
|
191
|
+
* `B` to `A`). One for each place the `$ref` is written. A `warning` when `parse.danglingRefs` lists
|
|
192
192
|
* the `$ref`'s kind: the ref stays, and resolving it throws
|
|
193
193
|
* `DanglingRefError`; with `allOfMember` listed, a `$ref` that core merges
|
|
194
194
|
* (in an `allOf`, or in a `oneOf` or `anyOf` member) is left out of the
|
|
@@ -199,7 +199,7 @@ export type AnyOasDocument = OpenAPIV2.Document | OpenAPIV3.Document | OpenAPIV3
|
|
|
199
199
|
* `REF_TYPE_MISMATCH` (`error`) — a `$ref` names a component of the wrong
|
|
200
200
|
* kind, such as a request body that is a `$ref` to
|
|
201
201
|
* `#/components/schemas/Pet`. One for each place the `$ref` is written. What
|
|
202
|
-
* holds the ref is removed; `
|
|
202
|
+
* holds the ref is removed; `parse.danglingRefs` does not apply.
|
|
203
203
|
*
|
|
204
204
|
* `RUN_FAILED` (`error`) — the run itself failed outside the per-item
|
|
205
205
|
* catches. Its `location` names the entry and phase, for example
|
|
@@ -63,7 +63,7 @@ export type TryParseAtArgs<T> = {
|
|
|
63
63
|
* given `type` and the thrown value as `cause`. A `DanglingRefError`
|
|
64
64
|
* is logged as `DANGLING_REF`: core resolved a ref while it parsed (one
|
|
65
65
|
* it merges, in an `allOf` or a `oneOf` or `anyOf` member, when
|
|
66
|
-
* `
|
|
66
|
+
* `parse.danglingRefs` does not list `allOfMember`)
|
|
67
67
|
* - registers a ref error if `refKey` is provided
|
|
68
68
|
* - returns `undefined`
|
|
69
69
|
*
|
|
@@ -27,7 +27,7 @@ import { DanglingRefError } from '../oas/ref/DanglingRefError.js';
|
|
|
27
27
|
* given `type` and the thrown value as `cause`. A `DanglingRefError`
|
|
28
28
|
* is logged as `DANGLING_REF`: core resolved a ref while it parsed (one
|
|
29
29
|
* it merges, in an `allOf` or a `oneOf` or `anyOf` member, when
|
|
30
|
-
* `
|
|
30
|
+
* `parse.danglingRefs` does not list `allOfMember`)
|
|
31
31
|
* - registers a ref error if `refKey` is provided
|
|
32
32
|
* - returns `undefined`
|
|
33
33
|
*
|
|
@@ -37,7 +37,7 @@ export type AuditGenerator = {
|
|
|
37
37
|
readonly type: 'oasOperation' | 'gqlOperation' | 'model' | 'webhook';
|
|
38
38
|
};
|
|
39
39
|
type FinalizeArgs = {
|
|
40
|
-
/** The consumer's `
|
|
40
|
+
/** The consumer's `skmtc.config.json#settings.enrichments` record. */
|
|
41
41
|
enrichments: GeneratorEnrichments | undefined;
|
|
42
42
|
/** The generators configured for this run. */
|
|
43
43
|
generators: readonly AuditGenerator[];
|
|
@@ -48,7 +48,7 @@ export type EnrichmentWarningType = 'UNCONSUMED_ENRICHMENT' | 'UNKNOWN_GENERATOR
|
|
|
48
48
|
export declare const enrichmentWarningType: v.GenericSchema<EnrichmentWarningType>;
|
|
49
49
|
/**
|
|
50
50
|
* One enrichment-config warning. `path` is the routing key sequence under
|
|
51
|
-
* `
|
|
51
|
+
* `skmtc.config.json#settings.enrichments` locating the offending entry —
|
|
52
52
|
* `[generatorId, ...subjectSegments]` for addressing warnings, extended
|
|
53
53
|
* down to the leaf key for `UNKNOWN_ENRICHMENT_KEY`. `suggestion` carries
|
|
54
54
|
* the nearest known key when a close match exists (`submitLabl` →
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* gives correct "did you mean …?" suggestions — the intended key is in
|
|
14
14
|
* the schema's entries even when it is optional and absent from the
|
|
15
15
|
* parsed value. This is deliberately a warning layer, not
|
|
16
|
-
* `v.strictObject`: a shared
|
|
16
|
+
* `v.strictObject`: a shared skmtc.config.json paired with an older generator
|
|
17
17
|
* version stays survivable under version skew instead of hard-failing.
|
|
18
18
|
*
|
|
19
19
|
* The walk is fail-open: unions, intersections, loose objects, and any
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* gives correct "did you mean …?" suggestions — the intended key is in
|
|
14
14
|
* the schema's entries even when it is optional and absent from the
|
|
15
15
|
* parsed value. This is deliberately a warning layer, not
|
|
16
|
-
* `v.strictObject`: a shared
|
|
16
|
+
* `v.strictObject`: a shared skmtc.config.json paired with an older generator
|
|
17
17
|
* version stays survivable under version skew instead of hard-failing.
|
|
18
18
|
*
|
|
19
19
|
* The walk is fail-open: unions, intersections, loose objects, and any
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* expected, not typos.
|
|
20
20
|
*
|
|
21
21
|
* A wrong-typed value throws ({@link parseEnrichmentValue}), naming each
|
|
22
|
-
* wrong value's place in `
|
|
22
|
+
* wrong value's place in `skmtc.config.json`. Unknown-key detection runs first,
|
|
23
23
|
* so a throwing leaf doesn't hide a dropped key.
|
|
24
24
|
*
|
|
25
25
|
* @module parseEnrichmentUmbrella
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* expected, not typos.
|
|
20
20
|
*
|
|
21
21
|
* A wrong-typed value throws ({@link parseEnrichmentValue}), naming each
|
|
22
|
-
* wrong value's place in `
|
|
22
|
+
* wrong value's place in `skmtc.config.json`. Unknown-key detection runs first,
|
|
23
23
|
* so a throwing leaf doesn't hide a dropped key.
|
|
24
24
|
*
|
|
25
25
|
* @module parseEnrichmentUmbrella
|
|
@@ -4,14 +4,14 @@ type ParseEnrichmentValueArgs<EnrichmentType> = {
|
|
|
4
4
|
value: unknown;
|
|
5
5
|
/** The generator whose schema reads `value`; `undefined` for the shared `_stack` bag. */
|
|
6
6
|
generatorId: string | undefined;
|
|
7
|
-
/** The `
|
|
7
|
+
/** The `skmtc.config.json#settings.enrichments` routing path of the value at `path` inside `value`. */
|
|
8
8
|
toRoutingPath: (path: readonly string[]) => string[];
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* `value` parsed through a generator's enrichment schema. Enrichments are
|
|
12
12
|
* typed configuration, so a value that does not match throws, and the run
|
|
13
13
|
* fails. The message lists every value that does not match, at its place in
|
|
14
|
-
* `
|
|
14
|
+
* `skmtc.config.json`, so the user can fix them all in one pass.
|
|
15
15
|
*/
|
|
16
16
|
export declare const parseEnrichmentValue: <EnrichmentType>({ schema, value, generatorId, toRoutingPath }: ParseEnrichmentValueArgs<EnrichmentType>) => EnrichmentType;
|
|
17
17
|
export {};
|
|
@@ -4,7 +4,7 @@ import { formatEnrichmentPath } from './EnrichmentWarning.js';
|
|
|
4
4
|
* `value` parsed through a generator's enrichment schema. Enrichments are
|
|
5
5
|
* typed configuration, so a value that does not match throws, and the run
|
|
6
6
|
* fails. The message lists every value that does not match, at its place in
|
|
7
|
-
* `
|
|
7
|
+
* `skmtc.config.json`, so the user can fix them all in one pass.
|
|
8
8
|
*/
|
|
9
9
|
export const parseEnrichmentValue = ({ schema, value, generatorId, toRoutingPath }) => {
|
|
10
10
|
const result = v.safeParse(schema, value);
|
|
@@ -19,7 +19,7 @@ export const parseEnrichmentValue = ({ schema, value, generatorId, toRoutingPath
|
|
|
19
19
|
const header = generatorId === undefined
|
|
20
20
|
? 'Stack enrichments do not match the schema a generator reads them with.'
|
|
21
21
|
: `Enrichments for '${generatorId}' do not match its enrichment schema.`;
|
|
22
|
-
throw new Error([`${header} Fix them in
|
|
22
|
+
throw new Error([`${header} Fix them in skmtc.config.json (settings.enrichments):`, ...lines].join('\n'));
|
|
23
23
|
};
|
|
24
24
|
/** What to do about one value: a scope the generator does not read takes no value at all. */
|
|
25
25
|
const toFix = (issue, generatorId) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Typed readers for the run-constant enrichment scopes.
|
|
3
3
|
*
|
|
4
4
|
* Three enrichment scopes share one storage namespace
|
|
5
|
-
* (`
|
|
5
|
+
* (`skmtc.config.json#settings.enrichments`), distinguished only by where they
|
|
6
6
|
* sit and how often they vary:
|
|
7
7
|
*
|
|
8
8
|
* - **subject** — `[id][subject][variant]`, resolved *per item* by the
|
|
@@ -36,7 +36,7 @@ type EnrichmentReadContext = {
|
|
|
36
36
|
/**
|
|
37
37
|
* Read this generator's **generator-scoped** enrichment — the
|
|
38
38
|
* run-constant leaf at
|
|
39
|
-
* `
|
|
39
|
+
* `skmtc.config.json#settings.enrichments[generatorId]._generator`, validated
|
|
40
40
|
* through the generator's own schema (typically declared as
|
|
41
41
|
* `toGeneratorEnrichmentSchema` on its entry, and reused here).
|
|
42
42
|
*
|
|
@@ -47,13 +47,13 @@ type EnrichmentReadContext = {
|
|
|
47
47
|
* config passes `v.optional(v.object({...}))`.
|
|
48
48
|
*
|
|
49
49
|
* @throws on a malformed block, naming each wrong value's place in
|
|
50
|
-
* `
|
|
50
|
+
* `skmtc.config.json`. The item is recorded as `error`, and the run fails once
|
|
51
51
|
* every generator has run, exactly as for a bad subject leaf.
|
|
52
52
|
*/
|
|
53
53
|
export declare const toGeneratorEnrichment: <EnrichmentType>(context: EnrichmentReadContext, generatorId: string, schema: v.GenericSchema<EnrichmentType>) => EnrichmentType;
|
|
54
54
|
/**
|
|
55
55
|
* Read the **stack-scoped** enrichment — the run-constant leaf at
|
|
56
|
-
* `
|
|
56
|
+
* `skmtc.config.json#settings.enrichments._stack`, validated through the
|
|
57
57
|
* caller's schema.
|
|
58
58
|
*
|
|
59
59
|
* The stack leaf is a single bag shared by every generator in the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Typed readers for the run-constant enrichment scopes.
|
|
3
3
|
*
|
|
4
4
|
* Three enrichment scopes share one storage namespace
|
|
5
|
-
* (`
|
|
5
|
+
* (`skmtc.config.json#settings.enrichments`), distinguished only by where they
|
|
6
6
|
* sit and how often they vary:
|
|
7
7
|
*
|
|
8
8
|
* - **subject** — `[id][subject][variant]`, resolved *per item* by the
|
|
@@ -28,7 +28,7 @@ import { parseEnrichmentValue } from './parseEnrichmentValue.js';
|
|
|
28
28
|
/**
|
|
29
29
|
* Read this generator's **generator-scoped** enrichment — the
|
|
30
30
|
* run-constant leaf at
|
|
31
|
-
* `
|
|
31
|
+
* `skmtc.config.json#settings.enrichments[generatorId]._generator`, validated
|
|
32
32
|
* through the generator's own schema (typically declared as
|
|
33
33
|
* `toGeneratorEnrichmentSchema` on its entry, and reused here).
|
|
34
34
|
*
|
|
@@ -39,7 +39,7 @@ import { parseEnrichmentValue } from './parseEnrichmentValue.js';
|
|
|
39
39
|
* config passes `v.optional(v.object({...}))`.
|
|
40
40
|
*
|
|
41
41
|
* @throws on a malformed block, naming each wrong value's place in
|
|
42
|
-
* `
|
|
42
|
+
* `skmtc.config.json`. The item is recorded as `error`, and the run fails once
|
|
43
43
|
* every generator has run, exactly as for a bad subject leaf.
|
|
44
44
|
*/
|
|
45
45
|
export const toGeneratorEnrichment = (context, generatorId, schema) => parseEnrichmentValue({
|
|
@@ -50,7 +50,7 @@ export const toGeneratorEnrichment = (context, generatorId, schema) => parseEnri
|
|
|
50
50
|
});
|
|
51
51
|
/**
|
|
52
52
|
* Read the **stack-scoped** enrichment — the run-constant leaf at
|
|
53
|
-
* `
|
|
53
|
+
* `skmtc.config.json#settings.enrichments._stack`, validated through the
|
|
54
54
|
* caller's schema.
|
|
55
55
|
*
|
|
56
56
|
* The stack leaf is a single bag shared by every generator in the
|
|
@@ -9,7 +9,7 @@ export type EnrichmentValidationScope = 'subject' | 'generator' | 'stack';
|
|
|
9
9
|
* One enrichment value that fails its generator's Valibot enrichment
|
|
10
10
|
* schema — the authoritative validation verdict. Produced by
|
|
11
11
|
* {@link validateConfig}; the routing fields locate the offending leaf in
|
|
12
|
-
* `
|
|
12
|
+
* `skmtc.config.json#settings.enrichments`:
|
|
13
13
|
*
|
|
14
14
|
* - **operation subject** — `subject` = path, `method` = HTTP method
|
|
15
15
|
* - **model subject** — `subject` = refName (no `method`)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* engine when a projection's `toExportPath` result is stored into
|
|
4
4
|
* `ContentSettings` (see `GenerateContext.to*ContentSettings`).
|
|
5
5
|
* Consumers override it per project via
|
|
6
|
-
* `
|
|
6
|
+
* `skmtc.config.json#settings.generatedSuffix`; setting it to `''` disables
|
|
7
7
|
* injection entirely.
|
|
8
8
|
*/
|
|
9
9
|
export declare const DEFAULT_GENERATED_SUFFIX = ".generated";
|
|
@@ -4,7 +4,7 @@ import { extname } from '../deps/jsr.io/@std/path/1.1.6/posix/extname.js';
|
|
|
4
4
|
* engine when a projection's `toExportPath` result is stored into
|
|
5
5
|
* `ContentSettings` (see `GenerateContext.to*ContentSettings`).
|
|
6
6
|
* Consumers override it per project via
|
|
7
|
-
* `
|
|
7
|
+
* `skmtc.config.json#settings.generatedSuffix`; setting it to `''` disables
|
|
8
8
|
* injection entirely.
|
|
9
9
|
*/
|
|
10
10
|
export const DEFAULT_GENERATED_SUFFIX = '.generated';
|
|
@@ -27,7 +27,7 @@ export type NormalizeWorkspacePathOptions = {
|
|
|
27
27
|
export declare const hasParentSegment: (path: string) => boolean;
|
|
28
28
|
/**
|
|
29
29
|
* Whether a path is absolute on either host: a POSIX root, a Windows drive
|
|
30
|
-
* (`C:\`, `C:/`) or a UNC share. Checked on every host, so a
|
|
30
|
+
* (`C:\`, `C:/`) or a UNC share. Checked on every host, so a skmtc.config.json
|
|
31
31
|
* written on Windows is rejected the same way on Linux.
|
|
32
32
|
*/
|
|
33
33
|
export declare const isAbsolutePath: (path: string) => boolean;
|
|
@@ -11,7 +11,7 @@ import { applyGeneratedSuffix } from './applyGeneratedSuffix.js';
|
|
|
11
11
|
export const hasParentSegment = (path) => path.split(/[/\\]/).some(segment => segment === '..');
|
|
12
12
|
/**
|
|
13
13
|
* Whether a path is absolute on either host: a POSIX root, a Windows drive
|
|
14
|
-
* (`C:\`, `C:/`) or a UNC share. Checked on every host, so a
|
|
14
|
+
* (`C:\`, `C:/`) or a UNC share. Checked on every host, so a skmtc.config.json
|
|
15
15
|
* written on Windows is rejected the same way on Linux.
|
|
16
16
|
*/
|
|
17
17
|
export const isAbsolutePath = (path) => isPosixAbsolute(path.replaceAll('\\', '/')) || isWindowsAbsolute(path);
|
package/esm/oas/array/Array.d.ts
CHANGED
|
@@ -111,8 +111,8 @@ export declare class OasArray<Nullable extends boolean | undefined = boolean | u
|
|
|
111
111
|
*/
|
|
112
112
|
deprecated: boolean | undefined;
|
|
113
113
|
/**
|
|
114
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
115
|
-
* `
|
|
114
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
115
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
116
116
|
* not read what. `undefined` otherwise.
|
|
117
117
|
*/
|
|
118
118
|
not: OasUnknown | undefined;
|
package/esm/oas/array/Array.js
CHANGED
|
@@ -154,8 +154,8 @@ export class OasArray extends OasBase {
|
|
|
154
154
|
value: void 0
|
|
155
155
|
});
|
|
156
156
|
/**
|
|
157
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
158
|
-
* `
|
|
157
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
158
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
159
159
|
* not read what. `undefined` otherwise.
|
|
160
160
|
*/
|
|
161
161
|
Object.defineProperty(this, "not", {
|
|
@@ -84,8 +84,8 @@ export declare class OasBoolean<Nullable extends boolean | undefined = boolean |
|
|
|
84
84
|
* instance (via the {@link OasBase} base).
|
|
85
85
|
*/
|
|
86
86
|
/**
|
|
87
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
88
|
-
* `
|
|
87
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
88
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
89
89
|
* not read what. `undefined` otherwise.
|
|
90
90
|
*/
|
|
91
91
|
not: OasUnknown | undefined;
|
|
@@ -115,8 +115,8 @@ export class OasBoolean extends OasBase {
|
|
|
115
115
|
* instance (via the {@link OasBase} base).
|
|
116
116
|
*/
|
|
117
117
|
/**
|
|
118
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
119
|
-
* `
|
|
118
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
119
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
120
120
|
* not read what. `undefined` otherwise.
|
|
121
121
|
*/
|
|
122
122
|
Object.defineProperty(this, "not", {
|
|
@@ -118,8 +118,8 @@ export declare class OasInteger<Nullable extends boolean | undefined = boolean |
|
|
|
118
118
|
*/
|
|
119
119
|
deprecated: boolean | undefined;
|
|
120
120
|
/**
|
|
121
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
122
|
-
* `
|
|
121
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
122
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
123
123
|
* not read what. `undefined` otherwise.
|
|
124
124
|
*/
|
|
125
125
|
not: OasUnknown | undefined;
|
|
@@ -167,8 +167,8 @@ export class OasInteger extends OasBase {
|
|
|
167
167
|
value: void 0
|
|
168
168
|
});
|
|
169
169
|
/**
|
|
170
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
171
|
-
* `
|
|
170
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
171
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
172
172
|
* not read what. `undefined` otherwise.
|
|
173
173
|
*/
|
|
174
174
|
Object.defineProperty(this, "not", {
|
|
@@ -37,7 +37,7 @@ export type IntersectionFields = {
|
|
|
37
37
|
* An `allOf` that keeps at least one reference: a value matches every member.
|
|
38
38
|
*
|
|
39
39
|
* Core merges the members of an `allOf` into one schema. A reference that
|
|
40
|
-
* `
|
|
40
|
+
* `skmtc.config.json` `parse.intersections` keeps is not merged: the schema is an
|
|
41
41
|
* `OasIntersection` of the kept references, and at most one other member, which
|
|
42
42
|
* the other members of the `allOf` merge into. By default those are the
|
|
43
43
|
* references that close a cycle.
|
|
@@ -83,8 +83,8 @@ export declare class OasIntersection extends OasBase {
|
|
|
83
83
|
/** The default value. */
|
|
84
84
|
default?: unknown;
|
|
85
85
|
/**
|
|
86
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
87
|
-
* `
|
|
86
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
87
|
+
* `parse.not: unknown`. `undefined` otherwise.
|
|
88
88
|
*/
|
|
89
89
|
not: OasUnknown | undefined;
|
|
90
90
|
constructor(fields: IntersectionFields, context?: ParseContextType);
|
|
@@ -13,7 +13,7 @@ import { DanglingRefError } from '../ref/DanglingRefError.js';
|
|
|
13
13
|
* An `allOf` that keeps at least one reference: a value matches every member.
|
|
14
14
|
*
|
|
15
15
|
* Core merges the members of an `allOf` into one schema. A reference that
|
|
16
|
-
* `
|
|
16
|
+
* `skmtc.config.json` `parse.intersections` keeps is not merged: the schema is an
|
|
17
17
|
* `OasIntersection` of the kept references, and at most one other member, which
|
|
18
18
|
* the other members of the `allOf` merge into. By default those are the
|
|
19
19
|
* references that close a cycle.
|
|
@@ -126,8 +126,8 @@ export class OasIntersection extends OasBase {
|
|
|
126
126
|
value: void 0
|
|
127
127
|
});
|
|
128
128
|
/**
|
|
129
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
130
|
-
* `
|
|
129
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
130
|
+
* `parse.not: unknown`. `undefined` otherwise.
|
|
131
131
|
*/
|
|
132
132
|
Object.defineProperty(this, "not", {
|
|
133
133
|
enumerable: true,
|
|
@@ -118,8 +118,8 @@ export declare class OasNumber<Nullable extends boolean | undefined = boolean |
|
|
|
118
118
|
*/
|
|
119
119
|
deprecated: boolean | undefined;
|
|
120
120
|
/**
|
|
121
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
122
|
-
* `
|
|
121
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
122
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
123
123
|
* not read what. `undefined` otherwise.
|
|
124
124
|
*/
|
|
125
125
|
not: OasUnknown | undefined;
|
package/esm/oas/number/Number.js
CHANGED
|
@@ -167,8 +167,8 @@ export class OasNumber extends OasBase {
|
|
|
167
167
|
value: void 0
|
|
168
168
|
});
|
|
169
169
|
/**
|
|
170
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
171
|
-
* `
|
|
170
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
171
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
172
172
|
* not read what. `undefined` otherwise.
|
|
173
173
|
*/
|
|
174
174
|
Object.defineProperty(this, "not", {
|
|
@@ -224,8 +224,8 @@ export declare class OasObject<Nullable extends boolean | undefined = boolean |
|
|
|
224
224
|
* ```
|
|
225
225
|
*/
|
|
226
226
|
/**
|
|
227
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
228
|
-
* `
|
|
227
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
228
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
229
229
|
* not read what. `undefined` otherwise.
|
|
230
230
|
*/
|
|
231
231
|
not: OasUnknown | undefined;
|
package/esm/oas/object/Object.js
CHANGED
|
@@ -260,8 +260,8 @@ export class OasObject extends OasBase {
|
|
|
260
260
|
* ```
|
|
261
261
|
*/
|
|
262
262
|
/**
|
|
263
|
-
* The schema's `not`, kept as an `OasUnknown` under `
|
|
264
|
-
* `
|
|
263
|
+
* The schema's `not`, kept as an `OasUnknown` under `skmtc.config.json`
|
|
264
|
+
* `parse.not: unknown`: the document says "not something", and core does
|
|
265
265
|
* not read what. `undefined` otherwise.
|
|
266
266
|
*/
|
|
267
267
|
Object.defineProperty(this, "not", {
|
|
@@ -153,7 +153,7 @@ export declare class OasOperation extends OasBase {
|
|
|
153
153
|
* The path item's come first.
|
|
154
154
|
*
|
|
155
155
|
* References stay references, so a caller can resolve each one on its own.
|
|
156
|
-
* A reference that names nothing (kept when `
|
|
156
|
+
* A reference that names nothing (kept when `parse.danglingRefs` lists
|
|
157
157
|
* `parameter`) keeps its place, and resolving it throws `DanglingRefError`.
|
|
158
158
|
* {@link OasOperation.toParams} resolves them all.
|
|
159
159
|
*
|
|
@@ -226,7 +226,7 @@ export class OasOperation extends OasBase {
|
|
|
226
226
|
* The path item's come first.
|
|
227
227
|
*
|
|
228
228
|
* References stay references, so a caller can resolve each one on its own.
|
|
229
|
-
* A reference that names nothing (kept when `
|
|
229
|
+
* A reference that names nothing (kept when `parse.danglingRefs` lists
|
|
230
230
|
* `parameter`) keeps its place, and resolving it throws `DanglingRefError`.
|
|
231
231
|
* {@link OasOperation.toParams} resolves them all.
|
|
232
232
|
*
|
|
@@ -12,14 +12,14 @@ type ToEffectiveParametersArgs = {
|
|
|
12
12
|
* them: the path item's first, then its own. An own parameter with the same
|
|
13
13
|
* name and location replaces the path item's. References stay references.
|
|
14
14
|
*
|
|
15
|
-
* A reference that names nothing (kept when `
|
|
15
|
+
* A reference that names nothing (kept when `parse.danglingRefs` lists
|
|
16
16
|
* `parameter`) has no name or location. It keeps its place, and only the
|
|
17
17
|
* same `$ref` replaces it.
|
|
18
18
|
*/
|
|
19
19
|
export declare const toEffectiveParameters: ({ own, shared }: ToEffectiveParametersArgs) => Parameter[];
|
|
20
20
|
/**
|
|
21
21
|
* True for a parameter `$ref` that names nothing in the document, which the
|
|
22
|
-
* parser keeps when `
|
|
22
|
+
* parser keeps when `parse.danglingRefs` lists `parameter`.
|
|
23
23
|
*/
|
|
24
24
|
export declare const namesNothing: (parameter: Parameter) => boolean;
|
|
25
25
|
export {};
|