Endpoint.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/server/api/Endpoint.hpp"

Endpoint

Endpoint - class which holds information about endpoint. It holds API documentation info, and pointer to RequestHandler

namespace oatpp { namespace web { namespace server { namespace api { 
  class Endpoint : public oatpp::base::Countable {}
}}}}

Endpoint::Info

Info holds API documentation information about endpoint

namespace oatpp { namespace web { namespace server { namespace api { 
  class Endpoint : public oatpp::base::Countable {
    class Info : public oatpp::base::Countable {}
  };
}}}}

Fields

Type Name Summary
std::unordered_map<oatpp::web::protocol::http::Status, ContentTypeAndSchema> responses ResponseCode to {ContentType, Type} mapping. Example responses[Status::CODE_200] = {"application/json", MyDto::ObjectWrapper::Class::getType()};

Endpoint::Info::responses

ResponseCode to {ContentType, Type} mapping. Example responses[Status::CODE_200] = {"application/json", MyDto::ObjectWrapper::Class::getType()};

std::unordered_map<oatpp::web::protocol::http::Status, ContentTypeAndSchema> responses

Endpoint::Info::Param

Param holds info about parameter

namespace oatpp { namespace web { namespace server { namespace api { 
  class Endpoint : public oatpp::base::Countable {
    class Info : public oatpp::base::Countable {
      struct Param {}
    };
  };
}}}}

Endpoint::Info::ContentTypeAndSchema

Info about content type and schema

namespace oatpp { namespace web { namespace server { namespace api { 
  class Endpoint : public oatpp::base::Countable {
    class Info : public oatpp::base::Countable {
      struct ContentTypeAndSchema {}
    };
  };
}}}}

Endpoint::Info::Params

Parameters container

namespace oatpp { namespace web { namespace server { namespace api { 
  class Endpoint : public oatpp::base::Countable {
    class Info : public oatpp::base::Countable {
      class Params {}
    };
  };
}}}}

Fields

Type Name Summary
Param& operator Get or add param by name
  • @param name
  • @return

Methods

Return Type Name Summary
Param& add Multiple implementations:
  1. Add parameter name to list order
  2. Add parameter name to list order

Endpoint::Info::Params::operator

Get or add param by name

  • @param name
  • @return

Param& operator [](const oatpp::String& name)

Endpoint::Info::Params::add

  1. Add parameter name to list order
    • @param name
    • @return new or existing parameter
    Param& add(const oatpp::String& name, oatpp::data::mapping::type::Type* type)
    
  2. Add parameter name to list order
    • @tparam T
    • @param name
    • @return new or existing parameter
    template<class T>
    Param& add(const oatpp::String& name)