1#ifndef SOURCEMETA_CORE_OPENAPI_ERROR_H_
2#define SOURCEMETA_CORE_OPENAPI_ERROR_H_
4#ifndef SOURCEMETA_CORE_OPENAPI_EXPORT
5#include <sourcemeta/core/openapi_export.h>
8#include <sourcemeta/core/error.h>
9#include <sourcemeta/core/json.h>
10#include <sourcemeta/core/jsonpointer.h>
15namespace sourcemeta::core {
17SOURCEMETA_CORE_ERROR_WARNINGS_PUSH
47 return this->location_;
52 [[nodiscard]]
auto base() const noexcept ->
JSON::StringView {
86 return this->identifier_;
92 return this->location_;
96 [[nodiscard]]
auto base() const noexcept ->
JSON::StringView {
132 return this->identifier_;
138 return this->location_;
142 [[nodiscard]]
auto base() const noexcept ->
JSON::StringView {
167 :
Error{
"The OpenAPI Description exceeds the maximum number of "
168 "locations that framing may register"},
172 [[nodiscard]]
auto limit() const noexcept -> std::uint64_t {
177 std::uint64_t limit_;
195 :
Error{
"The OpenAPI Description exceeds the maximum number of "
196 "locations that bundling may analyse"},
200 [[nodiscard]]
auto limit() const noexcept -> std::uint64_t {
205 std::uint64_t limit_;
208SOURCEMETA_CORE_ERROR_WARNINGS_POP
auto message() const noexcept -> StaticString
Definition error_base.h:78
Error(const StaticString message) noexcept
Construct the error given its message.
Definition error_base.h:84
std::basic_string< Char, CharTraits, Allocator< Char > > String
The string type used by the JSON document.
Definition json_value.h:52
GenericPointer< JSON::String, PropertyHashJSON< JSON::String > > Pointer
Definition jsonpointer.h:41
auto location() const noexcept -> const Pointer &
Definition openapi_error.h:46
auto base() const noexcept -> JSON::StringView
Definition openapi_error.h:52
OpenAPIBundleLimitError(const std::uint64_t limit) noexcept
Create a bundling limit error.
Definition openapi_error.h:194
OpenAPIFrameLimitError(const std::uint64_t limit) noexcept
Create a framing limit error.
Definition openapi_error.h:166
auto identifier() const noexcept -> JSON::StringView
The URI that nothing could produce a document for.
Definition openapi_error.h:85
OpenAPIError(const StaticString message, JSON::String base, Pointer location)
Definition openapi_error.h:40
auto base() const noexcept -> JSON::StringView
Get the base URI of the document that makes the reference.
Definition openapi_error.h:142
auto limit() const noexcept -> std::uint64_t
The maximum number of locations that framing was allowed to register.
Definition openapi_error.h:172
auto base() const noexcept -> JSON::StringView
Get the base URI of the document that makes the reference.
Definition openapi_error.h:96
auto location() const noexcept -> const Pointer &
Definition openapi_error.h:137
auto limit() const noexcept -> std::uint64_t
The maximum number of locations that bundling was allowed to register.
Definition openapi_error.h:200
auto location() const noexcept -> const Pointer &
Definition openapi_error.h:91
OpenAPIError(const StaticString message, Pointer location)
Construct an error from a message and where the problem is.
Definition openapi_error.h:35
auto identifier() const noexcept -> JSON::StringView
The URI that the reference names, resolved and canonicalised.
Definition openapi_error.h:131
OpenAPIReferenceError(const StaticString message, JSON::String base, Pointer location, JSON::String identifier)
Definition openapi_error.h:125
OpenAPIResolutionError(const StaticString message, JSON::String base, Pointer location, JSON::String identifier)
Definition openapi_error.h:79
Definition text_static_string.h:20