mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-23 20:48:11 +00:00
more tweaks
This commit is contained in:
parent
df544f88b2
commit
769a2e7d1c
@ -54,9 +54,9 @@ async function main() {
|
|||||||
const baseTypes = schema.definitions[interface].allOf
|
const baseTypes = schema.definitions[interface].allOf
|
||||||
.map((allof: { $ref: string }) => refToType(allof.$ref))
|
.map((allof: { $ref: string }) => refToType(allof.$ref))
|
||||||
.join(" & ");
|
.join(" & ");
|
||||||
file.push(`export type ${interface} = ${baseTypes} & {`);
|
file.push(`type ${interface} = ${baseTypes} & {`);
|
||||||
} else {
|
} else {
|
||||||
file.push(`export interface ${interface} {`);
|
file.push(`interface ${interface} {`);
|
||||||
}
|
}
|
||||||
for (const prop in schema.definitions[interface].properties) {
|
for (const prop in schema.definitions[interface].properties) {
|
||||||
const property = schema.definitions[interface].properties[prop];
|
const property = schema.definitions[interface].properties[prop];
|
||||||
@ -131,7 +131,6 @@ async function main() {
|
|||||||
const bodyParameter = operation.parameters.find(
|
const bodyParameter = operation.parameters.find(
|
||||||
(parameter: any) => parameter.in === "body" && parameter.required === true
|
(parameter: any) => parameter.in === "body" && parameter.required === true
|
||||||
);
|
);
|
||||||
console.log(bodyParameter);
|
|
||||||
file.push(`
|
file.push(`
|
||||||
/* ${operation.description} */
|
/* ${operation.description} */
|
||||||
export async function ${operation.operationId} (
|
export async function ${operation.operationId} (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user