-
-
Notifications
You must be signed in to change notification settings - Fork 14
Remove the schema transformer (moved to Blaze) #2344
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,6 @@ | |
| #endif | ||
|
|
||
| #include <sourcemeta/core/jsonpointer.h> | ||
| #include <sourcemeta/core/uri.h> | ||
|
|
||
| #include <exception> // std::exception | ||
| #include <string> // std::string | ||
|
|
@@ -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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This removes exported exception types ( Severity: medium 🤖 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 | ||
|
|
@@ -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 | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
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
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.