Skip to content

#26 Allow to download schema from http(s) #27

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dapicard
Copy link

I simply added the ability to download schemas from http using apache's HttpClient. This HttpClient can be configured using the system properties so it is possible to configure SSL, proxies, etc. this way.
I also added unit and integration tests.

@dapicard
Copy link
Author

@wilx Could you accept this pull request ?

@dapicard
Copy link
Author

Thank you @wilx
@sylvainlaurent Could you merge this pull request ? I would like to try it in an actual environment.

@dapicard
Copy link
Author

dapicard commented Feb 2, 2022

Can anybody merge this PR ?
Thank you.

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.*;

Choose a reason for hiding this comment

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

Please don't use wildcard imports.
You can read more about it here: https://stackoverflow.com/questions/147454/why-is-using-a-wild-card-with-a-java-import-statement-bad

InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(jsonSchemaFile);
if (inputStream != null) {
return inputStream;
try {

Choose a reason for hiding this comment

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

Could you split up these into multiple, smaller methods? It's quite hard to read it this way.

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.

3 participants