Skip to content

Commit

Permalink
Emit broken Swagger!
Browse files Browse the repository at this point in the history
Demonstrates khrt#46
  • Loading branch information
davel committed Sep 24, 2018
1 parent bb5fb43 commit c4f9eda
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions examples/music-app/lib/MusicApp/Entity/GetArtist.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package MusicApp::Entity::GetArtist;

use strict;
use warnings;

use Raisin::Entity;
use MusicApp::Entity::Artist;

expose 'data', using => 'MusicApp::Entity::Artist', desc => 'Artists found';

1;
3 changes: 2 additions & 1 deletion examples/music-app/script/music_app_dbix.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use Types::Standard qw(Any Int Str);

use MusicApp::Entity::Artist;
use MusicApp::Entity::ArtistList;
use MusicApp::Entity::GetArtist;
use MusicApp::Entity::Album;

use MusicApp::Schema;
Expand Down Expand Up @@ -42,7 +43,7 @@ resource artists => sub {
};

params requires('id', type => Int);
entity 'MusicApp::Entity::Artist';
entity 'MusicApp::Entity::GetArtist';
route_param id => sub {
get sub {
my $params = shift;
Expand Down

0 comments on commit c4f9eda

Please sign in to comment.