Skip to content

Commit

Permalink
feat: add readme section for bundling schemas (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
domire8 authored Jan 24, 2024
1 parent 23dffbd commit cc2a4c4
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,22 @@ See the [python](./python) subdirectory for more information and source code.
## Schemas

JSON schemas defining the expected syntax for AICA application files or component descriptions are available
in the [schemas](./schemas) subdirectory.
in the [schemas](./schemas) subdirectory.

### Bundling the schemas locally

In order to bundle the schemas locally for debugging and testing, do the following (replace `<path>` and `<schema>` for the
desired schema generation):

```bash
docker build -t aica-technology/api-schema - <<EOF
FROM node:latest
WORKDIR /tmp
COPY . .
RUN npm install utils
RUN node utils/bundleHelper.js <path>/<schema>.schema.json <schema>.schema.json
EOF
CONTAINER_ID=$(docker run -d aica-technology/api-schema)
docker cp "${CONTAINER_ID}":/tmp/<schema>.schema.json .
docker stop "${CONTAINER_ID}"
```

0 comments on commit cc2a4c4

Please sign in to comment.