(schema: JSONSchema7, ctx: GoCodegenCtx)
| 621 | } |
| 622 | |
| 623 | function goDiscriminatorValues(schema: JSONSchema7, ctx: GoCodegenCtx): GoDiscriminatorValues | undefined { |
| 624 | const stringValues = goStringEnumValues(schema, ctx); |
| 625 | if (stringValues) return { kind: "string", values: stringValues }; |
| 626 | |
| 627 | const booleanValues = goBooleanDiscriminatorValues(schema, ctx); |
| 628 | if (booleanValues) return { kind: "boolean", values: booleanValues }; |
| 629 | |
| 630 | return undefined; |
| 631 | } |
| 632 | |
| 633 | /** |
| 634 | * Find a literal-valued discriminator property shared by all anyOf variants. |
no test coverage detected
searching dependent graphs…