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

Possibility to replace Newtonsoft.Json.Schema with something having a more friendly license #96

Closed
aaschmid opened this issue Jul 5, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request waiting for feedback Waiting for feedback from issue submitter

Comments

@aaschmid
Copy link

aaschmid commented Jul 5, 2023

Unfortunately, we encountered another issue with this library for using it for our open source project catenax-ng/tx-portal-backend. Problem is that your Newtonsoft.Json.Schema dependency is published under "GNU Affero General Public License" which is incompatible with our project and the standards of Eclipse foundation.

As far as I understand, this dependency is only used in VerifiableResponse.cs (see code)) and also not further referenced in the production / shipped code.

Do you see any possibilities to get either replace it by an alternative e.g. https://github.com/gregsdennis/json-everything (published under MIT) or release and maintain a version without it?

CC @evegufy

@aaschmid aaschmid changed the title Possible to replace Newtonsoft.Json.Schema with something having a more friendly license Possibility to replace Newtonsoft.Json.Schema with something having a more friendly license Jul 5, 2023
@basdijkstra
Copy link
Owner

Hey @aaschmid, let me think about this for a bit. I don’t really feel like maintaining a separate version without that dependency but I’m happy to see if there’s an alternative for the JSON schema validation.

I’ve not really looked at the license but I see how this can be problematic, so replacing it is worth investigating.

I’ll get back to you soon.

@basdijkstra basdijkstra self-assigned this Jul 5, 2023
@basdijkstra basdijkstra added the enhancement New feature or request label Jul 5, 2023
@basdijkstra
Copy link
Owner

basdijkstra commented Jul 5, 2023

Hey @aaschmid and @evegufy, two questions:

  • Would NJsonSchema be a viable alternative? It seems easy enough to use
  • For approval, would you require me to entirely remove the dependency to Newtonsoft.Json.Schema, or would deprecating the methods that use them and providing alternatives using NJsonSchema be good enough for now?

Reason for question 2 is the fact I just released a new major version yesterday and given that this would be a breaking change (even if only of a single method that I suspect isn't really used all that often anyway) it would require me to bump the major version once again. It's only a number, I know, but still...

Cheers!

@evegufy
Copy link

evegufy commented Jul 6, 2023

Hi @basdijkstra thank you so much for considering this change!

I checked NJsonSchema 10.9.0 and it seems viable, the License is alright and also the source is tagged.

Newtonsoft.Json.Schema would needed to be gone when doing a dotnet list package, so deprecating the methods unfortunately wouldn't be quite sufficient. Sorry for the inconvenience of a possible major version bump!

@basdijkstra
Copy link
Owner

basdijkstra commented Jul 6, 2023

Hi @evegufy, no worries, that makes sense.

I've gone ahead and replaced Newtonsoft.Json.Schema with NJsonSchema now, here's the updated output:

Project 'RestAssured.Net' has the following package references
   [net6.0]: 
   Top-level Package                        Requested   Resolved
   > HtmlAgilityPack                        1.11.49     1.11.49 
   > Microsoft.AspNetCore.StaticFiles       2.2.0       2.2.0   
   > Microsoft.AspNetCore.WebUtilities      2.2.0       2.2.0   
   > Newtonsoft.Json                        13.0.3      13.0.3  
   > NHamcrest                              3.2.0       3.2.0   
   > NJsonSchema                            10.9.0      10.9.0  
   > Stubble.Core                           1.10.8      1.10.8  
   > StyleCop.Analyzers                     1.1.118     1.1.118 
   > System.Text.Encodings.Web              6.0.0       6.0.0   

   [net7.0]: 
   Top-level Package                        Requested   Resolved
   > HtmlAgilityPack                        1.11.49     1.11.49 
   > Microsoft.AspNetCore.StaticFiles       2.2.0       2.2.0   
   > Microsoft.AspNetCore.WebUtilities      2.2.0       2.2.0   
   > Newtonsoft.Json                        13.0.3      13.0.3  
   > NHamcrest                              3.2.0       3.2.0   
   > NJsonSchema                            10.9.0      10.9.0  
   > Stubble.Core                           1.10.8      1.10.8  
   > StyleCop.Analyzers                     1.1.118     1.1.118 
   > System.Text.Encodings.Web              6.0.0       6.0.0

If you think this is OK, I'll push the changes and publish RestAssured.Net 4.0.0-beta.1 for you to try out if that helps.

I appreciate you and @aaschmid pointing out that Newtonsoft.Json.Schema has a (semi-)commercial license, I'm happy to get rid of it.

EDIT: you can see the code changes here: https://github.com/basdijkstra/rest-assured-net/tree/feature/introduce_njsonschema

@evegufy
Copy link

evegufy commented Jul 6, 2023

Hi @basdijkstra I checked and that output looks really good!
It'd be awesome if you could publish the with 4.0.0-beta.1.
Thanks again!

@basdijkstra
Copy link
Owner

@evegufy here you go: https://www.nuget.org/packages/RestAssured.Net/4.0.0-beta.1

Please let me know if everything is in order with this latest release, I'd love to see RestAssured.Net used in your project.

A 'proper' version 4.0.0 will follow soon, but do let me know when you need it earlier than I provide it. There are some other features that I think I want to put in 4.0.0.

@basdijkstra basdijkstra added the waiting for feedback Waiting for feedback from issue submitter label Jul 6, 2023
@basdijkstra
Copy link
Owner

Hi @evegufy, @aaschmid,

I see this new build passed your checks: https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/9294

As I’m going on holiday for three weeks a week from now, is there anything you need from me this coming week to keep things moving?

I’ll keep track of any open issues but obviously won’t do a lot of dev work until I get back to work August 8 ;)

@evegufy
Copy link

evegufy commented Jul 8, 2023

Hi @basdijkstra

yes, the IP issue was approved 🤩

Sure, go ahead closing the issue (I can't as I didn't open it) there's no reason to keep the open.

Thanks again for your help and have a great holiday!

Cheers
Evelyn

@basdijkstra
Copy link
Owner

Closing this as discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting for feedback Waiting for feedback from issue submitter
Projects
None yet
Development

No branches or pull requests

3 participants