Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement schema validation #31

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3a362b5
Add valijson as git submodule (header-only library)
drdavella Aug 7, 2018
b76e5da
Checkpoint: commit first steps towards schema validation
drdavella Aug 7, 2018
a04be75
Implement YamlCppArray class
drdavella Aug 7, 2018
6ebccbd
Validation compiles but more work required
drdavella Aug 7, 2018
c2e0f9e
Temporary change to CMakeLists.txt to support testing of validation
drdavella Aug 7, 2018
a10db17
Fix YAML object iterator
drdavella Aug 8, 2018
aede35a
Fix test for isObject
drdavella Aug 8, 2018
c1ea65e
Fix dereference operator for object member
drdavella Aug 8, 2018
6ebeac0
Add AdapterTraits specialization for Yaml schema
drdavella Aug 8, 2018
8af7733
Add code to populate schema
drdavella Aug 8, 2018
58bf4b2
First apparently incorrect dereference in iterator
drdavella Aug 8, 2018
acb0cc3
Make sure to treat valijson headers as system headers
drdavella Aug 8, 2018
e848394
Fix dereference of YamlCppObjectMemberIterator
drdavella Aug 9, 2018
7dc841a
Fix semantics of isObject method of YamlCppNode
drdavella Aug 9, 2018
4e5291f
Override maybeString method from BasicAdapter
drdavella Aug 9, 2018
fa755a8
Intermediate progress: override asString for YamlCppAdapter
drdavella Aug 9, 2018
b38e5cb
Fix segfault that occurred during schema processing
drdavella Aug 23, 2018
9e5e171
Initial steps towards schema reference resolution
drdavella Aug 24, 2018
24f1ff0
More intermediate progress towards schema validation
drdavella Aug 28, 2018
74e6949
Push some adapter workarounds up into valijson
drdavella Sep 4, 2018
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "tests/googletest"]
path = tests/googletest
url = https://github.com/google/googletest
[submodule "extern/valijson"]
path = extern/valijson
url = https://github.com/tristanpenman/valijson
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ find_package(zlib)
find_package(bzip2)

set( INCLUDE_DIR include )
set( VALIJSON_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/valijson/include" )
include_directories( ${INCLUDE_DIR} ${YAML_INCLUDE_DIR} )
include_directories( SYSTEM ${VALIJSON_INCLUDE_DIR} )

set(asdf_c_flags ${CMAKE_C_FLAGS})
set(asdf_cxx_flags ${CMAKE_CXX_FLAGS})
Expand All @@ -63,6 +65,9 @@ set_target_properties(asdf-cpp PROPERTIES
COMPILE_FLAGS "${asdf_c_flags} ${asdf_cxx_flags}"
)

add_executable( validator src/validation.cpp )
target_link_libraries( validator yaml-cpp )

if (${ZLIB_FOUND})
target_compile_definitions(asdf-cpp PRIVATE HAS_ZLIB=1)
target_include_directories(asdf-cpp PRIVATE ${ZLIB_INCLUDE_DIRS})
Expand Down
1 change: 1 addition & 0 deletions extern/valijson
Submodule valijson added at 23f83b
Loading