...

Text file src/gitlab.hexacode.org/go-libs/microservice/config.json

Documentation: gitlab.hexacode.org/go-libs/microservice

     1{
     2    "namespace": "api-registration",
     3    "server": {
     4        "port": 80
     5    },
     6    "templates": [
     7        {
     8            "name": "registration",
     9            "path": "/",
    10            "file_path": "example/template.html"
    11        }
    12    ],
    13    "apis": [
    14        {
    15            "name": "registration",
    16            "path": "/registration",
    17            "method": "POST",
    18            "content_type": "application/json",
    19            "response_type": "application/json",
    20            "callback": {
    21                "plugin": "plugin.so",
    22                "function": "Registration"
    23            },
    24            "params": [
    25                { 
    26                    "name": "username", 
    27                    "label": "Username",
    28                    "placeholder": "Enter Username",
    29                    "type": "username",
    30                    "validate": "username",
    31                    "required": true,
    32                    "min": 5,
    33                    "max": 32
    34                },
    35                { 
    36                    "name": "fullname", 
    37                    "label": "Full Name",
    38                    "placeholder": "Enter Full Name",
    39                    "type": "name",
    40                    "validate": "name",
    41                    "required": true,
    42                    "min": 5,
    43                    "max": 32
    44                },
    45                { 
    46                    "name": "email", 
    47                    "label": "Email Address",
    48                    "placeholder": "Enter Email Address",
    49                    "type": "email",
    50                    "required": true,
    51                    "min": 5,
    52                    "max": 32
    53                },
    54                { 
    55                    "name": "password", 
    56                    "label": "Password",
    57                    "placeholder": "Enter Password",
    58                    "type": "password",
    59                    "required": true,
    60                    "min": 8,
    61                    "max": 120
    62                },
    63                { 
    64                    "name": "confirm_password", 
    65                    "label": "Confirm Password",
    66                    "placeholder": "Enter Confirm Password",
    67                    "type": "password",
    68                    "required": true,
    69                    "min": 8,
    70                    "max": 120
    71                }
    72            ]
    73        },
    74        {
    75            "name": "verification",
    76            "path": "/verification/:id/:otp",
    77            "method": "GET",
    78            "content_type": "application/json",
    79            "response_type": "application/json",
    80            "callback": {
    81                "plugin": "plugin.so",
    82                "function": "Verification"
    83            },
    84            "url_params": [
    85                { 
    86                    "name": "id", 
    87                    "type": "textnumber", 
    88                    "required": true
    89                },
    90                { 
    91                    "name": "otp", 
    92                    "type": "textnumber", 
    93                    "required": true
    94                }
    95            ]
    96        }
    97    ],
    98    "options": {
    99        "strapi_schemas": [
   100            {
   101                "name": "test",
   102                "label": "Test",
   103                "fields": {
   104                    "name": {
   105                        "type": "text",
   106                        "required": true
   107                    },
   108                    "email": {
   109                        "type": "email",
   110                        "required": true
   111                    }
   112                }
   113            }
   114        ]
   115    }
   116}

View as plain text