apps 0.0.1-beta.102 → 0.0.1-beta.103
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/framework-reference.json +1 -1
- package/js/openapi.js +12 -3
- package/package.json +1 -1
- package/runtime.json +1 -1
package/js/openapi.js
CHANGED
|
@@ -2078,6 +2078,10 @@ var binaryInput = {
|
|
|
2078
2078
|
description: "File bytes encoded as base64.",
|
|
2079
2079
|
contentEncoding: "base64"
|
|
2080
2080
|
};
|
|
2081
|
+
var parameterDocumentation = (parameter) => ({
|
|
2082
|
+
...typeof parameter.description === "string" && parameter.description.trim() !== "" ? { description: parameter.description } : {},
|
|
2083
|
+
...parameter.deprecated === true ? { deprecated: true } : {}
|
|
2084
|
+
});
|
|
2081
2085
|
var declaredAt = (document, value, inline) => document.origin(value) ?? inline;
|
|
2082
2086
|
var mediaSchemaAt = (document, at, type, media) => `${declaredAt(document, media, `${at}/content/${pointerToken(type)}`)}/schema`;
|
|
2083
2087
|
var responsesOf = (operation) => operation.responses === void 0 ? {} : record2(operation.responses);
|
|
@@ -2455,7 +2459,11 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
|
|
|
2455
2459
|
`The querystring parameter at ${parameterAt} must declare one form, JSON or text media type in content.`
|
|
2456
2460
|
);
|
|
2457
2461
|
}
|
|
2458
|
-
parameters.set(`${p.in}:${p.name}`, {
|
|
2462
|
+
parameters.set(`${p.in}:${p.name}`, {
|
|
2463
|
+
parameter: p,
|
|
2464
|
+
documentation: parameterDocumentation(declaration),
|
|
2465
|
+
at: parameterAt
|
|
2466
|
+
});
|
|
2459
2467
|
}
|
|
2460
2468
|
for (const name2 of prefix) {
|
|
2461
2469
|
const key = `path:${name2}`;
|
|
@@ -2467,17 +2475,18 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
|
|
|
2467
2475
|
if (!parameters.has(key))
|
|
2468
2476
|
parameters.set(key, {
|
|
2469
2477
|
parameter: { name: name2, in: "path", required: true, schema: { type: "string" } },
|
|
2478
|
+
documentation: {},
|
|
2470
2479
|
at: void 0
|
|
2471
2480
|
});
|
|
2472
2481
|
}
|
|
2473
2482
|
const groups = /* @__PURE__ */ new Map();
|
|
2474
|
-
for (const { parameter: p, at: parameterAt } of parameters.values()) {
|
|
2483
|
+
for (const { parameter: p, documentation, at: parameterAt } of parameters.values()) {
|
|
2475
2484
|
const key = p.in === "header" ? "headers" : p.in;
|
|
2476
2485
|
const group = groups.get(key) ?? { properties: {}, required: [] };
|
|
2477
2486
|
const [mediaType2, content] = p.content === void 0 ? [] : Object.entries(p.content)[0] ?? [];
|
|
2478
2487
|
const schema2 = p.schema ?? (content === void 0 ? {} : record2(content).schema ?? {});
|
|
2479
2488
|
const schemaAt = p.schema !== void 0 || mediaType2 === void 0 ? `${parameterAt}/schema` : mediaSchemaAt(document, `${parameterAt}`, mediaType2, content);
|
|
2480
|
-
group.properties[p.name] = parameterAt === void 0 ? () => schema2 : (api) => api(schema2, schemaAt);
|
|
2489
|
+
group.properties[p.name] = parameterAt === void 0 ? () => schema2 : (api) => ({ ...api(schema2, schemaAt), ...documentation });
|
|
2481
2490
|
if (p.required || p.in === "path") group.required.push(p.name);
|
|
2482
2491
|
groups.set(key, group);
|
|
2483
2492
|
}
|