Petersoj / alpaca-java

A Java API for Alpaca, the commission free, algo friendly, stock trading broker. https://alpaca.markets
https://petersoj.github.io/alpaca-java/
MIT License
197 stars 82 forks source link

Allow schemas and sources for jsonSchema2Pojo & organize sample JSON structure #24

Closed Petersoj closed 4 years ago

Petersoj commented 4 years ago

This allows certain sample JSONs to be either schemas or sources. Schemas allow for JSON POJO inheritance (for API endpoints that return complex JSON data that contains objects of dynamic structure), object referencing, javadocs, custom getter/setter names (to prevent name collisions), etc. The reference for schemas can be found here. You can change whether a sample JSON file is a schema or a JSON source file with the sampleJSONPOJOs variable in the build.gradle file. This PR also organizes the sample JSON into a structure that correlates with the various Alpaca and Polygon endpoint URLs for API consistency. I'll be using this heavily for my other PRs so there is likely quite a few bugs right now, but those will be resolved by my other PRs.

mainstringargs commented 4 years ago

@Petersoj just verifying -- should I be merging this or are you still working it?

Petersoj commented 4 years ago

@mainstringargs yes please merge this. I’ll mark my PRs that are still in progress as PR drafts and then mark those as ready for review when I’m done.