Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP committed Aug 8, 2024
1 parent f836d81 commit 0c122c0
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 18 deletions.
43 changes: 25 additions & 18 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ APIs for policy evaluation:
- `input` parameter MAY be an `object`, primitive literal or `ArrayBuffer`,
which assumed to be a well-formed stringified JSON

> `ArrayBuffer` supported in the APIs above as a performance optimisation
> feature, given that either network or file system provided contents can easily
> be represented as `ArrayBuffer` in a very performant way.
Example:

```java
Expand All @@ -98,6 +94,18 @@ System.out.println("Result is: " + result);
> [https://www.openpolicyagent.org/docs/latest/wasm/](https://www.openpolicyagent.org/docs/latest/wasm/)
> for more details.
## Builtins support:

At the moment we support the following builtins:

- Json
- `json.is_valid`

- Yaml
- `yaml.is_valid`
- `yaml.marshal`
- `yaml.unmarshal`

### Writing the policy

See
Expand All @@ -121,24 +129,23 @@ binary included. See [./examples](./examples) for a more comprehensive example.

See `opa build --help` for more details.

## Development

## Requirements:
To develop this library you need to have installed the following tools:

To run the tests you need the `opa` cli available on the `PATH` and `tar`.
- Java 11+
- Maven
- the `opa` cli
- `tar`

## Build:
the typical command to build and run the tests is:

```bash
mvn spotless:apply clean install
```
OPA_TESTSUITE=disabled mvn spotless:apply install
```

## Builtins:

We should have a section like this:
https://github.com/me-viper/OpaDotNet/blob/739b69ed22936455d1aa60909d8106184ef45c7f/docs/articles/Builtins.md

## TODO:
to disable the tests based on the Opa testsuite:

- CI - in progress
- Docs - to do
- ?
```bash
OPA_TESTSUITE=disabled mvn spotless:apply install
```
2 changes: 2 additions & 0 deletions jitpack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
before_install:
- sdk install maven 3.9.8
18 changes: 18 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<maven-surefire-plugin.version>3.3.1</maven-surefire-plugin.version>
<maven-plugin-plugin.version>3.13.1</maven-plugin-plugin.version>
<versions-maven-plugin.version>2.17.1</versions-maven-plugin.version>
<maven-javadoc-plugin.version>3.8.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -96,6 +97,23 @@
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>none</doclint>
<source>1.8</source>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down

0 comments on commit 0c122c0

Please sign in to comment.