Skip to content

Commit 03dc81d

Browse files
feat: creating better example docs
1 parent 7038fd4 commit 03dc81d

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: PersonSignedInContract
3+
version: 1
4+
summary: |
5+
A summary
6+
producers:
7+
- Producer
8+
consumers:
9+
- Consumer
10+
owners:
11+
- Name
12+
---
13+
14+
<Admonition>Some information</Admonition>
15+
16+
### Details
17+
18+
Some details...
19+
20+
<Schema />
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"properties": {
5+
"detail-type": {
6+
"type": "string",
7+
"const": "PersonSignedInContract"
8+
},
9+
"detail": {
10+
"type": "object",
11+
"properties": {
12+
"detail-version": {
13+
"type": "number",
14+
"const": 1
15+
},
16+
"data": {
17+
"type": "object",
18+
"properties": {
19+
"userName": {
20+
"type": "string"
21+
},
22+
"password": {
23+
"type": "string"
24+
}
25+
},
26+
"required": [
27+
"userName",
28+
"password"
29+
],
30+
"additionalProperties": false
31+
}
32+
},
33+
"required": [
34+
"detail-version",
35+
"data"
36+
],
37+
"additionalProperties": false
38+
}
39+
},
40+
"required": [
41+
"detail",
42+
"detail-type"
43+
],
44+
"additionalProperties": false,
45+
"definitions": {}
46+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Contract } from "../../types";
2+
3+
export interface PersonSignedInContract extends Contract {
4+
"detail-type": "PersonSignedInContract";
5+
detail: {
6+
"detail-version": 1;
7+
data: {
8+
userName: string;
9+
password: string;
10+
};
11+
};
12+
}

0 commit comments

Comments
 (0)