Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4320868
Add some nonstd string utils
eddyashton Mar 9, 2021
a09a9b5
Split works with string_views
eddyashton Mar 10, 2021
0076193
Add parse_query for turning string into map
eddyashton Mar 10, 2021
2035799
Ah yes, bugfix
eddyashton Mar 10, 2021
cd24b17
Use the new parse_query function
eddyashton Mar 10, 2021
85665d2
Add a helpful converter, use it in a few places
eddyashton Mar 10, 2021
598c030
Fix remaining uses in logging app
eddyashton Mar 10, 2021
45a61b4
Remove quotes from network/nodes
eddyashton Mar 10, 2021
570609a
Fix tests
eddyashton Mar 11, 2021
4746c8e
Make schema title optional
eddyashton Mar 11, 2021
e6ba79b
Add add_query_parameter
eddyashton Mar 11, 2021
7538ef8
Add query parameters, reuse query schema in components
eddyashton Mar 11, 2021
8295010
More accurately describe TransactionID
eddyashton Mar 11, 2021
f780b33
Merge branch 'main' of github.com:microsoft/CCF into non_json_query_p…
eddyashton Mar 11, 2021
1cb8d6c
Format
eddyashton Mar 11, 2021
6ca28cf
Remove auto-schema-to-query path
eddyashton Mar 11, 2021
3bab7ae
CHANGELOG tweak
eddyashton Mar 11, 2021
ae0e8c4
Format
eddyashton Mar 12, 2021
443b3cc
Merge branch 'main' into non_json_query_parsing
eddyashton Mar 12, 2021
669bde7
Merge branch 'main' of github.com:microsoft/CCF into non_json_query_p…
eddyashton Mar 15, 2021
9df1e38
Update docstrings
eddyashton Mar 15, 2021
91b4531
Merge branch 'non_json_query_parsing' of github.com:eddyashton/CCF in…
eddyashton Mar 15, 2021
17ed42d
Merge branch 'main' of github.com:microsoft/CCF into non_json_query_p…
eddyashton Mar 15, 2021
7aa4b17
Merge branch 'main' into non_json_query_parsing
achamayou Mar 15, 2021
292d5b4
Correct CHANGELOG
eddyashton Mar 16, 2021
1f71019
Merge branch 'main' of github.com:microsoft/CCF into non_json_query_p…
eddyashton Mar 16, 2021
023fdca
Add unit test for query parser
eddyashton Mar 16, 2021
540f6b8
Merge branch 'main' of github.com:microsoft/CCF into non_json_query_p…
eddyashton Mar 16, 2021
b9e023d
Add test of empty key
eddyashton Mar 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.19.2]

### Changed

- String values in query parameters no longer need to be quoted. For instance, you should now call `/network/nodes?host=127.0.0.1` rather than `/network/nodes?host="127.0.0.1"`.
- Schema documentation for query parameters should now be added with `add_query_parameter`, rather than `set_auto_schema`. The `In` type of `set_auto_schema` should only be used to describe the request body.
- `json_adapter` will no longer try to convert query parameters to a JSON object. The JSON passed as an argument to these handlers will now be populated only by the request body. The query string should be parsed separately, and `http::parse_query(s)` is added as a starting point. This means strings in query parameters no longer need to be quoted.

## [0.19.1]
Comment thread
eddyashton marked this conversation as resolved.

### Added
Expand Down Expand Up @@ -739,6 +747,7 @@ Some discrepancies with the TR remain, and are being tracked under https://githu

Initial pre-release

[0.19.2]: https://github.com/microsoft/CCF/releases/tag/ccf-0.19.2
[0.19.1]: https://github.com/microsoft/CCF/releases/tag/ccf-0.19.1
Comment thread
eddyashton marked this conversation as resolved.
[0.19.0]: https://github.com/microsoft/CCF/releases/tag/ccf-0.19.0
[0.18.5]: https://github.com/microsoft/CCF/releases/tag/ccf-0.18.5
Expand Down
98 changes: 38 additions & 60 deletions doc/schemas/app_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@
],
"type": "object"
},
"TransactionId": {
"pattern": "^[0-9]+\\.[0-9]+$",
"type": "string"
},
"TxStatus": {
"enum": [
"UNKNOWN",
Expand Down Expand Up @@ -433,22 +437,18 @@
"parameters": [
{
"in": "query",
"name": "seqno",
"required": false,
"name": "view",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
},
{
"in": "query",
"name": "view",
"required": false,
"name": "seqno",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
}
],
Expand All @@ -472,11 +472,9 @@
{
"in": "query",
"name": "id",
"required": false,
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
}
],
Expand All @@ -503,11 +501,9 @@
{
"in": "query",
"name": "id",
"required": false,
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
}
],
Expand Down Expand Up @@ -622,11 +618,9 @@
{
"in": "query",
"name": "id",
"required": false,
"required": true,
Comment thread
eddyashton marked this conversation as resolved.
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
}
],
Expand Down Expand Up @@ -655,31 +649,25 @@
{
"in": "query",
"name": "from_seqno",
"required": false,
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
},
{
"in": "query",
"name": "id",
"required": false,
"name": "to_seqno",
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
},
{
"in": "query",
"name": "to_seqno",
"required": false,
"name": "id",
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
}
],
Expand Down Expand Up @@ -708,11 +696,9 @@
{
"in": "query",
"name": "id",
"required": false,
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
}
],
Expand Down Expand Up @@ -796,11 +782,9 @@
{
"in": "query",
"name": "id",
"required": false,
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
}
],
Expand All @@ -827,11 +811,9 @@
{
"in": "query",
"name": "id",
"required": false,
"required": true,
"schema": {
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
"$ref": "#/components/schemas/uint64"
}
}
],
Expand Down Expand Up @@ -933,9 +915,9 @@
{
"in": "query",
"name": "transaction_id",
"required": false,
"required": true,
"schema": {
"type": "string"
"$ref": "#/components/schemas/TransactionId"
}
}
],
Expand All @@ -958,22 +940,18 @@
"parameters": [
{
"in": "query",
"name": "seqno",
"required": false,
"name": "view",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
},
{
"in": "query",
"name": "view",
"required": false,
"name": "seqno",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
}
],
Expand Down
40 changes: 18 additions & 22 deletions doc/schemas/gov_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@
],
"type": "object"
},
"TransactionId": {
"pattern": "^[0-9]+\\.[0-9]+$",
"type": "string"
},
"TxStatus": {
"enum": [
"UNKNOWN",
Expand Down Expand Up @@ -502,22 +506,18 @@
"parameters": [
{
"in": "query",
"name": "seqno",
"required": false,
"name": "view",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
},
{
"in": "query",
"name": "view",
"required": false,
"name": "seqno",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
}
],
Expand Down Expand Up @@ -776,9 +776,9 @@
{
"in": "query",
"name": "transaction_id",
"required": false,
"required": true,
"schema": {
"type": "string"
"$ref": "#/components/schemas/TransactionId"
}
}
],
Expand Down Expand Up @@ -851,22 +851,18 @@
"parameters": [
{
"in": "query",
"name": "seqno",
"required": false,
"name": "view",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
},
{
"in": "query",
"name": "view",
"required": false,
"name": "seqno",
"required": true,
"schema": {
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": "integer"
"$ref": "#/components/schemas/int64"
}
}
],
Expand Down
Loading