Skip to content

Commit

Permalink
Produce OpenAPI document describing CCF's endpoints (#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyashton committed Sep 25, 2020
1 parent e499f62 commit 37d78ec
Show file tree
Hide file tree
Showing 89 changed files with 4,320 additions and 294 deletions.
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ if(BUILD_TESTS)
json_schema ${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/json_schema.cpp
)

add_unit_test(
openapi_test ${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/openapi.cpp
)
target_link_libraries(openapi_test PRIVATE http_parser.host)

add_unit_test(
logger_json_test
${CMAKE_CURRENT_SOURCE_DIR}/src/ds/test/logger_json_test.cpp
Expand All @@ -265,7 +270,7 @@ if(BUILD_TESTS)
)
use_client_mbedtls(kv_test)
target_link_libraries(
kv_test PRIVATE ${CMAKE_THREAD_LIBS_INIT} secp256k1.host
kv_test PRIVATE ${CMAKE_THREAD_LIBS_INIT} secp256k1.host http_parser.host
)

add_unit_test(
Expand Down Expand Up @@ -311,6 +316,7 @@ if(BUILD_TESTS)
target_include_directories(history_test PRIVATE ${EVERCRYPT_INC})
target_link_libraries(
history_test PRIVATE ${CRYPTO_LIBRARY} evercrypt.host secp256k1.host
http_parser.host
)

add_unit_test(
Expand All @@ -330,7 +336,9 @@ if(BUILD_TESTS)
historical_queries_test
${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/historical_queries.cpp
)
target_link_libraries(historical_queries_test PRIVATE secp256k1.host)
target_link_libraries(
historical_queries_test PRIVATE secp256k1.host http_parser.host
)

add_unit_test(
snapshot_test ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/snapshot.cpp
Expand Down Expand Up @@ -427,7 +435,7 @@ if(BUILD_TESTS)
${CMAKE_CURRENT_SOURCE_DIR}/src/lua_interp/test/lua_kv.cpp
)
target_include_directories(lua_test PRIVATE ${LUA_DIR})
target_link_libraries(lua_test PRIVATE lua.host)
target_link_libraries(lua_test PRIVATE lua.host http_parser.host)

add_unit_test(
merkle_test ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/merkle_test.cpp
Expand Down
1 change: 0 additions & 1 deletion doc/schemas/ack/update_state_digest_POST_result.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"signed_req": {
"properties": {
Expand Down
1 change: 0 additions & 1 deletion doc/schemas/ack_POST_params.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"state_digest": {
"items": {
Expand Down
1 change: 0 additions & 1 deletion doc/schemas/ack_POST_result.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "ack/result",
"type": "boolean"
}
1 change: 0 additions & 1 deletion doc/schemas/api/schema_GET_params.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"method": {
"type": "string"
Expand Down
5 changes: 2 additions & 3 deletions doc/schemas/api/schema_GET_result.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"params_schema": {
"$ref": "https://json-schema.org/draft-07/schema#"
"type": "object"
},
"result_schema": {
"$ref": "https://json-schema.org/draft-07/schema#"
"type": "object"
}
},
"required": [
Expand Down
28 changes: 0 additions & 28 deletions doc/schemas/api_GET_result.json

This file was deleted.

Loading

0 comments on commit 37d78ec

Please sign in to comment.