(typeName: string, schema: JSONSchema7, ctx: GoCodegenCtx)
| 2947 | } |
| 2948 | |
| 2949 | function emitGoAlias(typeName: string, schema: JSONSchema7, ctx: GoCodegenCtx): void { |
| 2950 | if (ctx.generatedNames.has(typeName)) return; |
| 2951 | ctx.generatedNames.add(typeName); |
| 2952 | |
| 2953 | const lines: string[] = []; |
| 2954 | if (schema.description) { |
| 2955 | pushGoCommentForContext(lines, schema.description, ctx); |
| 2956 | } |
| 2957 | if (isSchemaExperimental(schema)) { |
| 2958 | pushGoExperimentalTypeComment(lines, typeName, ctx); |
| 2959 | } |
| 2960 | if (isSchemaDeprecated(schema)) { |
| 2961 | pushGoCommentForContext(lines, `Deprecated: ${typeName} is deprecated and will be removed in a future version.`, ctx); |
| 2962 | } |
| 2963 | lines.push(`type ${typeName} ${resolveGoPropertyType(schema, typeName, "Value", true, ctx)}`); |
| 2964 | ctx.structs.push(lines.join("\n")); |
| 2965 | } |
| 2966 | |
| 2967 | function emitGoRpcDefinition(definitionName: string, schema: JSONSchema7, ctx: GoCodegenCtx): string { |
| 2968 | const typeName = goDefinitionName(definitionName); |
no test coverage detected
searching dependent graphs…