Skip to content

Commit

Permalink
Moved README
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrichner-oviva committed May 16, 2024
1 parent c0ffee8 commit 3901513
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 44 deletions.
52 changes: 51 additions & 1 deletion README.md
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>
```
43 changes: 0 additions & 43 deletions generator-maven-plugin/README.md

This file was deleted.

0 comments on commit 3901513

Please sign in to comment.