-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0ffee8
commit 3901513
Showing
2 changed files
with
51 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,51 @@ | ||
The spice must flow. | ||
# SpiceDB Client Generator | ||
|
||
- Bored of copy & pasting strings from your SpiceDB schema into your client code? | ||
- Had enough bugs or downtimes due to client library bugs due to typing and typo mistakes? | ||
|
||
*Look no further!* | ||
|
||
This is a Java generator for SpiceDB schemas which: | ||
|
||
- generates `String` constants for object definitions, permissions and relations | ||
- generates type-safe object references | ||
- provides factory methods to assemble type-safe relationship updates | ||
|
||
## Getting Started | ||
|
||
1. Add the `com.oviva.spicegen:api` dependency | ||
2. Add the `com.oviva.spicegen:spicegen-maven-plugin` plugin | ||
|
||
Example `pom.xml` | ||
|
||
```xml | ||
... | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.oviva.spicegen</groupId> | ||
<artifactId>api</artifactId> | ||
<version>${spicegen.version}</version> | ||
</dependency> | ||
</dependencies> | ||
... | ||
<plugins> | ||
<plugin> | ||
<groupId>com.oviva.spicegen</groupId> | ||
<artifactId>spicegen-maven-plugin</artifactId> | ||
<version>${spicegen.version}</version> | ||
<executions> | ||
<execution> | ||
<configuration> | ||
<!-- NOTE: for now the schema needs to be pre-processed into an AST --> | ||
<asyncApiPath>${project.basedir}/src/main/resources/schema_ast.json</asyncApiPath> | ||
<packageName>${project.groupId}.permissions</packageName> | ||
<outputDirectory>${project.basedir}/target/generated-sources/src/main/java</outputDirectory> | ||
</configuration> | ||
<goals> | ||
<goal>spicegen</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
``` |
This file was deleted.
Oops, something went wrong.