Skip to content

Conversation

@Vitalii4as
Copy link
Contributor

@Vitalii4as Vitalii4as commented Dec 24, 2025

Sub-taskHCK-14077 Improve FE of oneOf fields

Content

The name of the final field with union type in the generated Avro schema should be taken by the logic:

graph TD

    A[Field name?] --> B{"Does the oneOf choice have a (technical) name?"}

    B -->|Yes| C["Field name = oneOf (technical) name"]

    B -->|No| D["Field name = (technical) name of the first  subschema"]

    C --> G[End]
    D --> G
Loading

The name of record/fixed/enum` should be taken by the logic:

graph TD

  A[Name of named type record-enum-fixed?] --> B{"Is the 'Type name' property of the attribute record/enum/fixed filled?"}

    B -->|Yes| C["Name of type record/enum/fixed = 'Type name' property of the attribute record/enum/fixed"]

    B -->|No|R{"Is it a reference?"} 

    -->|No|D["Name of type record/enum/fixed = (technical) name of the attribute record/enum/fixed"]
    R -->|Yes|E["Name of type record/enum/fixed = (technical) name of the referenced definition"]
    
    C --> G[End]
    D --> G
    E --> G
Loading

@Vitalii4as Vitalii4as self-assigned this Dec 24, 2025
@sonarqubecloud
Copy link

@serhii-filonenko serhii-filonenko enabled auto-merge (squash) December 24, 2025 13:40
@serhii-filonenko serhii-filonenko merged commit f180b40 into develop Dec 24, 2025
9 checks passed
@serhii-filonenko serhii-filonenko deleted the fix/HCK-14077 branch December 24, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants