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

Detail improvement and typo #293

Open
frabac72 opened this issue May 24, 2023 · 2 comments
Open

Detail improvement and typo #293

frabac72 opened this issue May 24, 2023 · 2 comments

Comments

@frabac72
Copy link
Contributor

Hello!

For a WSDL-comparer tool I am working on I made a couple of changes locally, which I would like to see happening in the core code, if you think they are improvements:

  1. when printing an element, add the namespace, so:
  • in ComplexTypeDiffGenerator, change
    new Difference(description:"${labelComplexType} ${a.qname?.localPart ?: ''}:" , type: 'complexType' , diffs : diffs, exchange: a.exchange)
    to
    new Difference(description:"${labelComplexType} ${a.qname?.localPart ? "{" + a.schema.targetNamespace + "}": ''}${a.qname?.localPart ?: ''}:" , type: 'complexType' , diffs : diffs, exchange: a.exchange)
  • in SimpleTypeDiffGenerator, same, change
    def changed = { new Difference(description:"${labelSimpleType} ${a?.name}:", type: 'simpleType', diffs:compareUnit(), exchange: a.exchange)}
    to
    def changed = { new Difference(description:"${labelSimpleType} ${"{" + a.schema.targetNamespace + "}"}${a?.name}:", type: 'simpleType', diffs:compareUnit(), exchange: a.exchange)}
  1. correct a typo, so in SimpleRestrictionDiffGenerator change
    diffs << compare(a.enumerationFacets, b.enumerationFacets, {new Difference(description:"Enumerartion with value: ${it.value} removed.", type: 'facet', warning: true)}, {new Difference(description:"Enumerartion with value: ${it.value} added.", type: 'facet', warning: true)})
    to
    diffs << compare(a.enumerationFacets, b.enumerationFacets, {new Difference(description:"Enumeration with value: ${it.value} removed.", type: 'facet', warning: true)}, {new Difference(description:"Enumeration with value: ${it.value} added.", type: 'facet', warning: true)})
    the difference being "Enumerartion" => "Enumeration"

Please let me know what you think.

Thanks :-)

@predic8
Copy link
Member

predic8 commented May 25, 2023

Hi @frabac72 ,
I think your improvements are reasonable.
But this is an old project and we spend only little time on it. However you can create a Pull-Request with all the changes and with test coverage. All the tests should be working. We can then review the PR and maybe accept it.
But I am not sure if we can change the description. Maybe some code depends on it.
Cheers
Thomas

@frabac72
Copy link
Contributor Author

Thanks for your prompt answer!
For the change in the description, that was kind of my point, as I changed it locally and built my code on the correct spelling :-)
Let me know and I will proceed only if you are happy

Thank so much!!

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

2 participants