Skip to content

Conversation

@jiholee17
Copy link
Contributor

Follow-up to #877 to dedup method names in generated projections and superinterfaces in generated types.

Also explicitly uses the client package for generated *Representation types. It worked correctly before for schema-defined types but external types broke because the representation type generator used String replace with the external package path to import the Representation type which didn't exist.

@iuliiasobolevska
Copy link
Collaborator

Notes from in person discussion:

  • evaluate if SchemaExtensionsUtils.collectAllFieldDefinitions could be used in ClientApiGenerator
  • log a warn when duplicate schema paths are specified

@jiholee17
Copy link
Contributor Author

Added warning for when redundant schema paths are specified in build.gradle (i.e. one is a descendant of the other). Generator still makes a best effort to dedup in this case. collectAllFieldDefinitions is already used in ClientApiGenerator to consolidate/dedup fields but not the types themselves, which are duplicated when documents are loaded twice. I kept the distinct() and distinctBy() handling in the client/type generator to handle these cases (which shouldn't happen unless the same file is loaded twice).

@jiholee17 jiholee17 merged commit dddd6a8 into master Nov 13, 2025
3 checks passed
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.

4 participants