Skip to content

Commit

Permalink
Add branch switching in JPA Elide docs
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Jun 24, 2024
1 parent d641d59 commit 373eceb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
file:///*
https://querydsl.com/*
https://uel.java.net/
https://www.openapis.org/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Documentation
JWT supports 3 kinds of webservice templates:

- [A general scaffolding without any vertical-business logics](https://qubitpi.github.io/jersey-webservice-template/docs/intro)
- [A JPA webservice template backed by yahoo/elide](https://qubitpi.github.io/jersey-webservice-template/docs/elide/intro)
- [A JPA webservice template backed by yahoo/elide](https://qubitpi.github.io/jersey-webservice-template/docs/crud/)
- An async jobstore webservice template similar to yahoo/fili's JobStore design (Developing...)

Comprehensive documentation is viewable on our [website][Documentation]
Expand Down
Binary file modified docs/docs/crud/img/instantiation-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 15 additions & 4 deletions docs/docs/crud/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ Instantiating the Template

Please visit [JWT GitHub] and either

1. clone the repo with `git clone https://github.com/QubitPi/jersey-webservice-template.git`, or
1. clone the repo with `git clone https://github.com/QubitPi/jersey-webservice-template.git` and switch to the
`jpa-elide` branch using `git checkout jpa-elide`, or
2. make it a template instantiation with our own webservice name by doing the following:

![Error loading instantiation-1.png](./img/instantiation-1.png)

:::note

Please make sure the "__Include all branches__" is checked

:::

![Error loading instantiation-2.png](./img/instantiation-2.png)

Creating Models
Expand Down Expand Up @@ -71,7 +79,8 @@ In the end, run `mvn clean install` to install our model

:::info

From this point on, we assume [this example data model][jersey-webservice-template-jpa-data-models] is used
From this point on, we assume [this example data model][jersey-webservice-template-jpa-data-models] is used, which can
be installed locally using the following commands:

```bash
git clone https://github.com/QubitPi/jersey-webservice-template-jpa-data-models.git
Expand All @@ -85,7 +94,7 @@ Loading Data Models
-------------------

So now we have some models, but without an API it is not very useful. Now we need to instruct our _my-webservice_ to
load [data models](#creating-models) via Maven config file, i.e. **~/.m2/settings.xml**:
load [data models](#creating-models) via Maven config file, i.e. __settings.xml__:

```xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
Expand Down Expand Up @@ -117,10 +126,12 @@ With data models defined, can run _my-webservice_

```bash
cd my-webservice
mvn clean package
mvn clean package --settings settings.xml
MODEL_PACKAGE_NAME=io.github.qubitpi.ws.jersey.template.models docker compose up --build --force-recreate
```

Note that the `settings.xml` is the [Maven config file for loading the data model](#loading-data-models)

:::info

`io.github.qubitpi.ws.jersey.template.models` is the name of the model in the aforementioned
Expand Down

0 comments on commit 373eceb

Please sign in to comment.