Skip to content

Utility

Steve Hu edited this page Sep 25, 2016 · 1 revision

This module contains some useful classes that shared by multiple modules within the framework.

SwaggerHelper

This is a class that provides several static method for accessing swagger.json from the config folder. It also helps to match the incoming request uri and method to the right operation in the spec so that security module and validator module can work on top of the specific operation according to the request uri and method. To assist scope verification in security module, it provides getOAuth2Name() method to get the name of the oauth2 type in security definitions.

Constants

Contains all the constants shared by all modules.

ModuleRegistry

When the plugin modules are loaded, it will register itself to this module along with configuration. When /server/info is called, the endpoint will return all plugged in modules and their configurations.

Util

Some useful utility method like uuid generator etc.

Petstore swagger

This module includes a copy of petstore swagger.json in its resources/config folder. It is for testing purpose only and for you own API build, please include your swagger.json into your application resources/config folder to overwrite this copy.