You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 17, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-50Lines changed: 1 addition & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ APId is a framework that lets you write declarative, end-to-end collections of r
6
6
7
7
## ⬇️ Installation
8
8
9
-
APId comes in both binary packages and docker image. You can find the docker image [here](https://hub.docker.com/r/getapid/apid), while the binaries can be found [here](https://github.com/getapid/apid/releases)
9
+
APId comes in both binary packages and docker image. You can find the docker image [here](https://github.com/getapid/apid/pkgs/container/apid), while the binaries can be found [here](https://github.com/getapid/apid/releases)
10
10
11
11
Here's how to install the latest binary on UNIX based systems:
12
12
@@ -73,55 +73,6 @@ For more examples please check the [`examples`](examples) folder in this reposit
73
73
74
74
## 📚 Documentation
75
75
76
-
APId tests, or specs, are written in `jsonnet`. There are a number of built-in useful functions to make it easier to make and validate requests to your API.
77
-
78
-
```jsonnet
79
-
// contents of `example.jsonnet`
80
-
81
-
{
82
-
simple_spec: spec([
83
-
{
84
-
name: "google homepage",
85
-
request: {
86
-
method: "GET",
87
-
url: "https://www.google.com/"
88
-
},
89
-
expect: {
90
-
code: 200
91
-
}
92
-
}
93
-
])
94
-
}
95
-
```
96
-
97
-
To run the test, issue
98
-
99
-
```bash
100
-
> apid check -s "example.jsonnet"
101
-
102
-
example::simple_spec
103
-
google homepage
104
-
+ status code is 200
105
-
106
-
specs passed: 1
107
-
specs failed: 0
108
-
```
109
-
110
-
Success! You've just written your first APId test! If you change the `expect.code` from `200` to lets say `500` the test will fail and this will be the output:
111
-
112
-
```bash
113
-
> apid check -s "example.jsonnet"
114
-
115
-
example::simple_spec
116
-
google homepage
117
-
o status code: wanted 500, got 200
118
-
119
-
specs passed: 0
120
-
specs failed: 1
121
-
```
122
-
123
-
## Structure
124
-
125
76
APId comes with a list of helpful functions that let you define what to expect from each response. Before looking into that, lets see what's the basic structure of a spec file.
126
77
127
78
Spec files are written in [jsonnet](https://jsonnet.org/). There is a helper function to define a spec, conveniently named `spec`.
0 commit comments