Skip to content

Commit

Permalink
feat: add modify and validate, validate all json payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen committed Jan 15, 2024
1 parent 5a22a53 commit 63551fc
Show file tree
Hide file tree
Showing 83 changed files with 1,860 additions and 320 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
vendor = false

[build]
rustflags = ["--cfg", "tokio_unstable"]
# target="x86_64-unknown-linux-musl"
Expand Down
140 changes: 88 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ members = [

"rs/packages/payments",

"rs/packages/modify",
"rs/packages/modify_derive",

"rs/packages/metre",
"rs/packages/metre-macros",
]
Expand Down
4 changes: 3 additions & 1 deletion defs/api/accounts/POST/Payload.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
],
"properties": {
"name": {
"type": "string"
"type": "string",
"maxLength": 60,
"minLength": 1
},
"plan_id": {
"type": "string"
Expand Down
48 changes: 28 additions & 20 deletions defs/api/accounts/[account]/PATCH/Payload.schema.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
{
"type": "object",
"required": [
"patch"
],
"properties": {
"name": {
"type": "string",
"maxLength": 60,
"minLength": 1,
"nullable": true
},
"plan_id": {
"type": "string",
"nullable": true
},
"user_metadata": {
"patch": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"system_metadata": {
"type": "object",
"additionalProperties": true,
"nullable": true
"properties": {
"name": {
"type": "string",
"maxLength": 60,
"minLength": 1,
"nullable": true
},
"plan_id": {
"type": "string",
"nullable": true
},
"user_metadata": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"system_metadata": {
"type": "object",
"additionalProperties": true,
"nullable": true
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
2 changes: 1 addition & 1 deletion defs/api/accounts/[account]/PATCH/Payload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AccountPatch } from "../../../../ops/AccountPatch";

export type Payload = AccountPatch;
export type Payload = { patch: AccountPatch };
16 changes: 12 additions & 4 deletions defs/api/admins/POST/Payload.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@
],
"properties": {
"first_name": {
"type": "string"
"type": "string",
"maxLength": 100,
"minLength": 1
},
"last_name": {
"type": "string"
"type": "string",
"maxLength": 100,
"minLength": 1
},
"email": {
"type": "string"
"type": "string",
"maxLength": 100,
"minLength": 1
},
"password": {
"type": "string"
"type": "string",
"maxLength": 60,
"minLength": 8
},
"system_metadata": {
"type": "object",
Expand Down
7 changes: 5 additions & 2 deletions defs/api/admins/[admin]/PATCH/Payload.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
"properties": {
"first_name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"nullable": true
},
"last_name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"nullable": true
},
"system_metadata": {
"type": "object",
"additionalProperties": true,
"nullable": true
}
},
"additionalProperties": false
}
}
Loading

0 comments on commit 63551fc

Please sign in to comment.