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

Make the API more extensible #63

Closed
mjburghoffer opened this issue Feb 14, 2018 · 6 comments
Closed

Make the API more extensible #63

mjburghoffer opened this issue Feb 14, 2018 · 6 comments

Comments

@mjburghoffer
Copy link

I am trying to use this library, and have run into the following design issues:

  • JsonSchemaFactory is a non-final class, but its only constructor is private
    • please make the constructor protected
  • JsonSchema is a non-final class, but its useful constructors are all package private
    • make the constructors protected
    • extract an interface so consumers can customize behavior
  • JsonSchemaFactory.Builder requires an instance of JsonSchemaFactory to instantiate - it seems silly to need to create an instance of a factory to create the builder of a new factory just to throw away the first initial factory.

In general, this library is great, but ultimately is unusable except for exactly how it was programmed. A little bit of extenisbility would go a long way.

@stevehu
Copy link
Contributor

stevehu commented Feb 14, 2018

@mjburghoffer You have a lot of good recommendations and I do realize that some sort of refactors need to be done. I have mentioned it in the following post. Just need to find two or three days to do it.

#54

@mjburghoffer
Copy link
Author

@stevehu thanks for responding so quickly! Let me know if you'd like me to make a PR.

@stevehu
Copy link
Contributor

stevehu commented Feb 14, 2018

Yes. Please. Just make sure that we keep the JsonSchemaFactory for now until we have a major release. There are a lot of people using this library and we cannot force them to make change. Thanks a lot for your help.

@nvdgit
Copy link

nvdgit commented Oct 29, 2018

Any timeframe for this issue to be resolved, also referenced issue stackOverflowError loading schema file #96.

@stevehu
Copy link
Contributor

stevehu commented Oct 29, 2018

I think the private constructor issue has been resolved already. For the circular dependency issue, we need more time to refactor it. I have already done that for openapi-parser but his library has not been done.

@stevehu
Copy link
Contributor

stevehu commented Aug 7, 2019

I think most of the issues mentioned have been resolved. Closing it and will open individual issues if there is still a gap.

@stevehu stevehu closed this as completed Aug 7, 2019
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