Skip to content

Add support for models on types for Ruby#3117

Merged
koesie10 merged 2 commits intomainfrom
koesie10/fix-ruby-modules
Dec 8, 2023
Merged

Add support for models on types for Ruby#3117
koesie10 merged 2 commits intomainfrom
koesie10/fix-ruby-modules

Conversation

@koesie10
Copy link
Copy Markdown
Member

@koesie10 koesie10 commented Dec 7, 2023

This fixes two bugs that happen when a "method" is actually a type and does not belong to a specific method. This happens in Ruby when specifying subclasses where Net::HTTPHeader,HTTParty::Response::Headers, in the YAML format means that HTTParty::Response::Headers inherits from Net::HTTPHeader. Type models are able to generate this data already, so we should propagate this information.

For testing this, you can use this branch with a jnunemaker/httparty database. HTTParty::Response::Headers is a good test class since it inherits from Net::HTTPHeader:

Screenshot 2023-12-07 at 16 27 52

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

This fixes the rendering of method names when either the type or method
name is empty. This can happen when the method is a not in a class or
when the method is a synthetic method and the properties actually apply
to the type.
This fixes the output of the Ruby MaD models when the method name is
empty which can happen when the model applies to a type rather than to
a method.
@koesie10 koesie10 force-pushed the koesie10/fix-ruby-modules branch from 338aeff to 0a4d28e Compare December 7, 2023 15:52
@koesie10 koesie10 marked this pull request as ready for review December 8, 2023 10:10
@koesie10 koesie10 requested a review from a team as a code owner December 8, 2023 10:10
@koesie10 koesie10 requested a review from starcke December 8, 2023 11:02
Copy link
Copy Markdown
Contributor

@starcke starcke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@koesie10 koesie10 merged commit f596f7e into main Dec 8, 2023
@koesie10 koesie10 deleted the koesie10/fix-ruby-modules branch December 8, 2023 13:42
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.

2 participants