MySQL 9.3.0
Source Code Documentation
openapi_object_creator.h File Reference
#include <rapidjson/document.h>
#include <string_view>
#include "mrs/database/entry/db_object.h"
#include "mrs/database/entry/db_schema.h"
#include "mrs/database/entry/db_service.h"
#include "mrs/endpoint/db_object_endpoint.h"
#include "mysql/harness/logging/logging.h"

Go to the source code of this file.

Namespaces

namespace  mrs
 
namespace  mrs::rest
 

Typedefs

using mrs::rest::DbObject = mrs::database::entry::DbObject
 
using mrs::rest::DbService = mrs::database::entry::DbService
 
using mrs::rest::DbObjectPtr = std::shared_ptr< DbObject >
 

Functions

rapidjson::Value mrs::rest::get_route_openapi_schema_path (const std::optional< uint32_t > privileges, DbObjectPtr entry, const std::string &url, rapidjson::Document::AllocatorType &allocator)
 Create OpenAPI 'paths' section. More...
 
rapidjson::Value mrs::rest::get_route_openapi_component (DbObjectPtr entry, rapidjson::Document::AllocatorType &allocator)
 Create OpenAPI components section containing security schemes and schemas (type information with constraints) for each db object passed as a parameter. More...
 
void mrs::rest::get_procedure_metadata_component (rapidjson::Value &schema_properties, rapidjson::Document::AllocatorType &allocator)
 Create "_metadata" schema component item from a procedure call. More...
 
rapidjson::Value mrs::rest::get_header_info (std::shared_ptr< DbService > service, rapidjson::Document::AllocatorType &allocator)
 Create OpenAPI title, version and description. More...
 
bool mrs::rest::is_supported (const std::shared_ptr< mrs::database::entry::DbObject > &db_obj, const std::shared_ptr< mrs::database::entry::DbSchema > &db_schema)
 Check if the given DB Object entry can be used for getting an OpenAPI description. More...
 
rapidjson::Value mrs::rest::get_security_scheme (rapidjson::Document::AllocatorType &allocator)
 Create security scheme for OpenAPI. More...
 
template<typename R >
std::vector< R * > mrs::rest::sort_children_by_request_path (std::vector< std::shared_ptr< mrs::interface::EndpointBase > > children)
 Sort Endpoint children by request path. More...
 

Variables

constexpr std::string_view mrs::rest::k_auth_method_name = "mrs_login"
 
constexpr std::string_view mrs::rest::k_schema_version {"1.0.0"}
 
constexpr std::string_view mrs::rest::k_openapi_version {"3.1.0"}