Created
March 13, 2017 22:29
-
-
Save scottw/1a46855f44caf79d0549ab43e0793273 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Meta; | |
sub docs { | |
my $c = shift->openapi->valid_input or return; | |
$c->respond_to(openapi => $c->openapi->spec(''), any => $c->openapi->spec('')); ## FIXME | |
} | |
1; | |
__DATA__ | |
@@ spec.yaml | |
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: My API | |
#basePath: (not set) | |
paths: | |
'/docs': | |
get: | |
description: | | |
Return OpenAPI specification for My API | |
x-mojo-to: "meta#docs" | |
responses: | |
'200': | |
description: OpenAPI response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment