Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only note spec and generator version in gemspec file #78

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

bradymholt
Copy link
Member

@bradymholt bradymholt commented Jul 8, 2024

Rather than adding a comment on most generated files with the version of the spec and the version of the generator, we will note it once in the gemspec file. This will reduce the diff in future PRs while still preserving the helpful version numbers.

@@ -23,7 +20,7 @@ Gem::Specification.new do |s|
s.email = ["[email protected]"]
s.homepage = "https://github.com/ynab/ynab-sdk-ruby"
s.summary = "YNAB API Endpoints Ruby Gem"
s.description = "Ruby gem wrapper for the YNAB API. Read the documentation at https://api.ynab.com"
s.description = "Ruby gem wrapper for the YNAB API. Read the documentation at https://api.ynab.com Generated from server specification version 1.70.0 using OpenAPI Generator version 7.6.0."
Copy link
Member Author

Choose a reason for hiding this comment

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

Versions are now noted once, here in the gemspec.

@@ -0,0 +1,3 @@
This directory contains override templates for generating Ruby code from the OpenAPI spec. The modify the default behavior or the generator.
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this README for future reference when we need to override a template.

@bradymholt bradymholt changed the title Only note version in gemspec to reduce file diffs Only note spec and generator version in gemspec file Jul 8, 2024
@@ -0,0 +1,9 @@
{{#appName}}
Copy link
Member Author

Choose a reason for hiding this comment

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

Overriding this template is the primary change here. The original (default) version version cane be found here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/ruby-client/api_info.mustache

Copy link

@joshmenden joshmenden left a comment

Choose a reason for hiding this comment

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

Love it

@bradymholt bradymholt merged commit bb2fe17 into main Jul 8, 2024
1 check passed
@bradymholt bradymholt deleted the reduce-diff branch July 8, 2024 21:41
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