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

Can not get DefaultConfig from maven #9

Closed
ohadabraham opened this issue Apr 26, 2022 · 4 comments
Closed

Can not get DefaultConfig from maven #9

ohadabraham opened this issue Apr 26, 2022 · 4 comments

Comments

@ohadabraham
Copy link

Hi ,

when i am trying to get maven project ver 0.4.5 i do not have DefaultConfig file ( but i do see it on your GitHub solution )- can u please help me understand what i am doing wrong ?
my pom is :


jitpack.io
https://jitpack.io

<dependencies>

    <dependency>
        <groupId>com.github.jimblackler</groupId>
        <artifactId>jsongenerator</artifactId>
        <version>0.4.5</version>
    </dependency>
    <dependency>
</dependencies>

code:
Configuration config = DefaultConfig.build()
.setGenerateMinimal(false)
.setNonRequiredPropertyChance(0.5f)
.get();
SchemaStore schemaStore = new SchemaStore(true);
Schema schema = schemaStore.loadSchemaJson("{ "type": "object", "properties": { "name": { "type": "string" }, "birthday": { "type": "string", "format": "date" }, "age": { "type": "integer" } } }");
Generator generator = new Generator(config, schemaStore, new Random());
Object json = generator.generate(schema, 10);

		// sample output: {name=vxtydd, birthday=2377-03-08, age=544}
		System.out.println(json);

fail here - DefaultConfig

@ohadabraham
Copy link
Author

done

@jimblackler
Copy link
Owner

The Maven version was behind the GitHub latest. I've just published 0.4.6 for you. Let me know if that fixes your issue.

@ohadabraham
Copy link
Author

THANK U !!!

@jimblackler
Copy link
Owner

jimblackler commented Apr 26, 2022 via email

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

2 participants