(schemas: JSONSchema7[], ctx: GoCodegenCtx)
| 2128 | } |
| 2129 | |
| 2130 | function dedupeGoSchemasForMatch(schemas: JSONSchema7[], ctx: GoCodegenCtx): JSONSchema7[] { |
| 2131 | const seen = new Set<string>(); |
| 2132 | const result: JSONSchema7[] = []; |
| 2133 | for (const schema of schemas) { |
| 2134 | const key = stableStringify(normalizeSchemaForMatch(schema, ctx)); |
| 2135 | if (seen.has(key)) continue; |
| 2136 | seen.add(key); |
| 2137 | result.push(schema); |
| 2138 | } |
| 2139 | return result; |
| 2140 | } |
| 2141 | |
| 2142 | function goDefinitionRefForEquivalentSchema(schema: JSONSchema7, ctx: GoCodegenCtx): string | undefined { |
| 2143 | const schemaKey = stableStringify(normalizeSchemaForMatch(schema, ctx)); |
no test coverage detected
searching dependent graphs…