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

Allow URLs as source locations #293

Closed
jvasiljevich opened this issue Feb 25, 2015 · 1 comment
Closed

Allow URLs as source locations #293

jvasiljevich opened this issue Feb 25, 2015 · 1 comment
Milestone

Comments

@jvasiljevich
Copy link

We are planning to leverage jsonschema2pojo within a microservice project. The goal is to be able to integrate our individual microservices using only their respective schemata, without sharing any jars between the services. This library is a great fit for that, with one little snafu: our schemata are currently stored behind a RESTful api. Ideally, we'd like to be able to specify a http url as the schema source, and generate the POJOs from there. Something like this:

<plugin>
    <groupId>org.jsonschema2pojo</groupId>
    <artifactId>jsonschema2pojo-maven-plugin</artifactId>
    <version>0.4.7</version>
    <configuration>
        <sourceDirectory>http://myschemalocation.com/schema/target-schema</sourceDirectory>
        <targetPackage>com.example.types</targetPackage>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Currently, this doesn't work because the GenerationConfig interface is expecting a list of java Files. However, since further downstream the ContentResolver seems to accept a URL, this seems like it would be a trivial issue to address.

Is this already being worked on?

@joelittlejohn
Copy link
Owner

Closed by #294.

@joelittlejohn joelittlejohn changed the title Maven: Specify http url as sourceDirectory Allow URLs as source locations Mar 6, 2015
@joelittlejohn joelittlejohn added this to the 0.4.9 milestone Mar 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants