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

Edit changelog messages #350

Open
reuvenharrison opened this issue Jul 31, 2023 · 7 comments
Open

Edit changelog messages #350

reuvenharrison opened this issue Jul 31, 2023 · 7 comments

Comments

@reuvenharrison
Copy link
Collaborator

I suggest two changes to these messages:

  1. display both orignal and new value
  2. a nicer way to say it

for example:
the %s request property's maxLength was increased to %s
will become:
for the %s request property, maxLength was increased from '%s' to '%s'

Originally posted by @reuvenharrison in #345 (comment)

@blva
Copy link
Contributor

blva commented Jul 31, 2023

We should think of how we can inform this to customers so they can update err/warn files, or maybe add a solution/script to update changed phrases.

@gcatanese
Copy link

@reuvenharrison What do you think about the option to pass a custom lang flag (i.e. my_labels) that it is used instead of the supported languages?
Developers could customise the labels/messages they want to use (effectively using the same key but deciding the value) and keeping it in a local folder (outside the tool).

Happy to contribute if you think this is a desired feature.

@reuvenharrison
Copy link
Collaborator Author

reuvenharrison commented Jan 15, 2025

Hi @gcatanese
Sorry but I didn't understand the requirement.
Could you explain the goal?
What functionality are you looking for?

@gcatanese
Copy link

@reuvenharrison Sorry, what I meant is:

  • pass a new value for the lang flag (--lang dir/myBundle), or better a new flag (--bundle dir/myBundle)
  • myBundle is a file in the dir folder that contains a customised version of the messages and labels
request-body-added-required: new (required) Request Body
request-body-added-optional: new (optional) Request Body
request-parameter-removed: removed the %s Request Parameter %s
...
  • OASDiff will use the messages and labels from myBundle when generating a report

The benefits are:

  • developers can fully customise the messages generated in the report
  • the custom file stays outside the OASDiff source code

@reuvenharrison
Copy link
Collaborator Author

Thanks for the clarification.
Why do you prefer this approach over the current mechanism?

@gcatanese
Copy link

I understood it is only possible to change the language.

Am I missing something? Is it already possible to override the messages without updating the source code?

@reuvenharrison
Copy link
Collaborator Author

In order to override one or more messages you would need to change the code.
Is that a problem?
The only reason I can think of to do it outside of the code is if you want a custom message per run.
But perhaps I am missing something...

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

No branches or pull requests

3 participants