Resources.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-swagger
#include "oatpp-swagger/Resources.hpp"

Resources

This class is responsible for loading Swagger-UI resources.

namespace oatpp { namespace swagger { 
  class Resources {}
}}

Methods

Return Type Name Summary
[none] Resources Constructor.
std::shared_ptr<Resources> loadResources Load and cache Swagger-UI resources.
oatpp::String getResource Get cached resource by filename.

Resources::Resources

Constructor.

  • @param resDir - directory containing swagger-ui resources.

Resources(const oatpp::String& resDir)

Resources::loadResources

Load and cache Swagger-UI resources.

  • @param resDir - directory containing swagger-ui resources.
  • @return - std::shared_ptr to Resources.

static std::shared_ptr<Resources> loadResources(const oatpp::String& resDir)

Resources::getResource

Get cached resource by filename.

  • @param filename - name of the resource file.
  • @return - oatpp::String containing resource binary data.

oatpp::String getResource(const oatpp::String& filename)