Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/core/jsonschema/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ include(./known_resolver.cmake)

sourcemeta_library(NAMESPACE sourcemeta PROJECT core NAME jsonschema
PRIVATE_HEADERS bundle.h walker.h frame.h error.h
types.h transform.h vocabularies.h
types.h vocabularies.h
SOURCES jsonschema.cc vocabularies.cc known_walker.cc
frame.cc walker.cc bundle.cc transformer.cc format.cc helpers.h
frame.cc walker.cc bundle.cc format.cc helpers.h
"${CMAKE_CURRENT_BINARY_DIR}/known_resolver.cc")

if(SOURCEMETA_CORE_INSTALL)
Expand Down
1 change: 0 additions & 1 deletion src/core/jsonschema/include/sourcemeta/core/jsonschema.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <sourcemeta/core/jsonschema_bundle.h>
#include <sourcemeta/core/jsonschema_error.h>
#include <sourcemeta/core/jsonschema_frame.h>
#include <sourcemeta/core/jsonschema_transform.h>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing #include <sourcemeta/core/jsonschema_transform.h> from the umbrella header is an API-breaking change for downstream users that relied on #include <sourcemeta/core/jsonschema.h> to access transformer types. Consider making sure the migration path (new Blaze header/package + versioning/release notes) is clearly communicated to avoid silent consumer breakage.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

#include <sourcemeta/core/jsonschema_types.h>
#include <sourcemeta/core/jsonschema_walker.h>
// NOLINTEND(misc-include-cleaner)
Expand Down
52 changes: 0 additions & 52 deletions src/core/jsonschema/include/sourcemeta/core/jsonschema_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#endif

#include <sourcemeta/core/jsonpointer.h>
#include <sourcemeta/core/uri.h>

#include <exception> // std::exception
#include <string> // std::string
Expand Down Expand Up @@ -121,31 +120,6 @@ class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaReferenceError
const char *message_;
};

/// @ingroup jsonschema
/// An error that represents a broken schema resolution event
class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaBrokenReferenceError
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes exported exception types (SchemaBrokenReferenceError, SchemaAbortError, and later SchemaTransformRuleProcessedTwiceError) from a public header, which can break consumers that catch/mention them even if the transformer feature moved out. Consider ensuring this API removal is intentional and documented as part of the Blaze migration.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

: public SchemaReferenceError {
using SchemaReferenceError::SchemaReferenceError;
};

/// @ingroup jsonschema
/// An error that represents that a schema operation cannot continue
class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaAbortError
: public std::exception {
public:
SchemaAbortError(const char *message) : message_{message} {}
SchemaAbortError(std::string message) = delete;
SchemaAbortError(std::string &&message) = delete;
SchemaAbortError(std::string_view message) = delete;

[[nodiscard]] auto what() const noexcept -> const char * override {
return this->message_;
}

private:
const char *message_;
};

/// @ingroup jsonschema
/// An error that represents that the dialect of the schema could not determined
class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaUnknownDialectError
Expand All @@ -171,32 +145,6 @@ class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaUnknownBaseDialectError
}
};

/// @ingroup jsonschema
/// An error that signifies that a transform rule was applied more than once
class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaTransformRuleProcessedTwiceError
: public std::exception {
public:
SchemaTransformRuleProcessedTwiceError(const std::string_view name,
Pointer location)
: name_{name}, location_{std::move(location)} {}

[[nodiscard]] auto what() const noexcept -> const char * override {
return "Transformation rules must only be processed once";
}

[[nodiscard]] auto name() const noexcept -> std::string_view {
return this->name_;
}

[[nodiscard]] auto location() const noexcept -> const Pointer & {
return this->location_;
}

private:
std::string name_;
Pointer location_;
};

/// @ingroup jsonschema
/// In JSON Schema Draft 7 and older, a schema that defines `$ref` is a
/// reference object where every other keywords are ignored
Expand Down
302 changes: 0 additions & 302 deletions src/core/jsonschema/include/sourcemeta/core/jsonschema_transform.h

This file was deleted.

Loading
Loading