diff --git a/codegen-csharp/class.ts b/codegen-csharp/class.ts index b9e48da..7750226 100644 --- a/codegen-csharp/class.ts +++ b/codegen-csharp/class.ts @@ -34,7 +34,7 @@ export class Class extends Type { namespace.addClass(this); if (!this.description.trim()) { - this.description = `FIXME: Class ${name} is MISSING DESCRIPTION`; + this.description = ''; } } diff --git a/codegen-csharp/field.ts b/codegen-csharp/field.ts index bbb254c..f6d70b7 100644 --- a/codegen-csharp/field.ts +++ b/codegen-csharp/field.ts @@ -34,7 +34,7 @@ export class Field extends Variable { this.apply(objectInitializer); if (!this.description.trim()) { - this.description = `FIXME: Field ${name} is MISSING DESCRIPTION`; + this.description = ''; } } diff --git a/codegen-csharp/interface.ts b/codegen-csharp/interface.ts index 00f7e63..52463b3 100644 --- a/codegen-csharp/interface.ts +++ b/codegen-csharp/interface.ts @@ -15,7 +15,7 @@ export class Interface extends Type { parent.addInterface(this); if (!this.description.trim()) { - this.description = `FIXME: Interface ${name} is MISSING DESCRIPTION`; + this.description = ''; } } diff --git a/codegen-csharp/method.ts b/codegen-csharp/method.ts index 33c9367..3548d94 100644 --- a/codegen-csharp/method.ts +++ b/codegen-csharp/method.ts @@ -43,10 +43,10 @@ export class Method extends Statements { } if (!this.description.trim()) { - this.description = `FIXME: Method ${name} is MISSING DESCRIPTION`; + this.description = ''; } if (!this.returnsDescription.trim()) { - this.returnsDescription = `FIXME: Method ${name} is MISSING DESCRIPTION`; + this.returnsDescription = ''; } } diff --git a/codegen-csharp/parameter.ts b/codegen-csharp/parameter.ts index d380ba2..9c3ed4f 100644 --- a/codegen-csharp/parameter.ts +++ b/codegen-csharp/parameter.ts @@ -31,7 +31,7 @@ export class Parameter extends Variable { this.apply(objectInitializer); if (!this.description.trim()) { - this.description = `FIXME: Parameter ${name} is MISSING DESCRIPTION`; + this.description = ''; } } diff --git a/codegen-csharp/property.ts b/codegen-csharp/property.ts index 52b7da9..7fdc0bb 100644 --- a/codegen-csharp/property.ts +++ b/codegen-csharp/property.ts @@ -55,7 +55,7 @@ export class Property extends Variable implements Instance { this.apply(objectInitializer); if (!this.description.trim()) { - this.description = `FIXME: Property ${name} is MISSING DESCRIPTION`; + this.description = ''; } } @@ -172,8 +172,8 @@ ${indent(g, 2)} const e = `${this.value}.${methodName}(${parameters.joinWith(valueOf)})`; return intersect( toExpression(e), { - implementation: `${e};` - }); + implementation: `${e};` + }); } } diff --git a/codemodel-v3/code-model/command-operation.ts b/codemodel-v3/code-model/command-operation.ts index 3451522..a1bbd0f 100644 --- a/codemodel-v3/code-model/command-operation.ts +++ b/codemodel-v3/code-model/command-operation.ts @@ -60,7 +60,7 @@ export class CommandOperation extends Extensions implements CommandOperation { this.details = { default: { uid: `command-operation:${uid()}`, - description: 'MISSING DESCRIPTION 01', + description: initializer?.description || '', name, } }; diff --git a/codemodel-v3/code-model/http-operation.ts b/codemodel-v3/code-model/http-operation.ts index f982150..ad0e989 100644 --- a/codemodel-v3/code-model/http-operation.ts +++ b/codemodel-v3/code-model/http-operation.ts @@ -170,7 +170,7 @@ export class NewResponse extends Extensions implements NewResponse { default: { uid: `response:${uid()}`, isErrorResponse: false, - description: 'MISSING DESCRIPTION 09', + description: description || objectInitializer?.description || '', name: `${responseCode} ${mimeTypes.join(' ')}`, } }; @@ -194,7 +194,7 @@ export class HttpOperation extends Extensions implements HttpOperation { this.details = { default: { uid: `http-operation:${uid()}`, - description: 'MISSING DESCRIPTION 05', + description: initializer?.description || '', name: operationId, } }; @@ -253,7 +253,7 @@ export class HttpOperationParameter extends Extensions implements HttpOperationP this.details = { default: { uid: `http-parameter:${uid()}`, - description: 'MISSING DESCRIPTION 06', + description: initializer?.description || '', location: implementation, name, } diff --git a/codemodel-v3/code-model/programatic-operation.ts b/codemodel-v3/code-model/programatic-operation.ts index c2e1c63..2873889 100644 --- a/codemodel-v3/code-model/programatic-operation.ts +++ b/codemodel-v3/code-model/programatic-operation.ts @@ -30,7 +30,7 @@ export class IntrinsicOperation extends Extensions implements IntrinsicOperation this.details = { default: { uid: `intrinsic-operation:${uid()}`, - description: 'MISSING DESCRIPTION 07', + description: initializer?.description || '', name, } }; diff --git a/codemodel-v3/code-model/schema.ts b/codemodel-v3/code-model/schema.ts index 52781d2..ea04064 100644 --- a/codemodel-v3/code-model/schema.ts +++ b/codemodel-v3/code-model/schema.ts @@ -177,7 +177,7 @@ export class Property extends Extensions implements Property { default: { readOnly: false, uid: `property:${uid()}`, - description: 'MISSING DESCRIPTION 03', + description: initializer?.description || '', name, required: false } diff --git a/oai2-to-oai3/main.ts b/oai2-to-oai3/main.ts index 11beac6..b75af93 100644 --- a/oai2-to-oai3/main.ts +++ b/oai2-to-oai3/main.ts @@ -56,6 +56,8 @@ export class Oai2ToOai3 { case 'required': case 'type': case 'name': + // turn these into x-* properties + param[`x-${key}`] = originalParameter[key]; break; default: param[key] = originalParameter[key];