source: ProjectBuilder/devel/pb-server/lib/ProjectBuilder/Controller/Example.pm@ 2624

Last change on this file since 2624 was 2624, checked in by Bruno Cornec, 4 years ago

More tests around OpenAPI - back to a working server with v3

File size: 487 bytes
Line 
1package ProjectBuilder::Controller::Example;
2use Mojo::Base 'Mojolicious::Controller';
3
4# This action will render a template
5sub welcome {
6 my $self = shift;
7
8 # Render template "example/welcome.html.ep" with message
9 $self->render(msg => 'Welcome to the Project-Builder real-time web framework based on Mojolicious!');
10}
11
12sub hello_world {
13 my $c = shift->openapi->valid_input or return;
14
15 my $output = { greeting => 'Hello World' };
16 $c->render(openapi => $output);
17}
18
19
201;
Note: See TracBrowser for help on using the repository browser.