Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #226 from vimeo/cleanup-multi-response-messages
Browse files Browse the repository at this point in the history
Some more revisions to how we display multi-response messages.
  • Loading branch information
erunion authored Feb 28, 2019
2 parents e8b4861 + 07e26c2 commit 2ffe828
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion resources/examples/Showtimes/compiled/1.0/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/Showtimes/compiled/1.1.1/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down Expand Up @@ -350,7 +350,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down Expand Up @@ -348,7 +348,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/Showtimes/compiled/1.1.2/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -350,7 +350,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -348,7 +348,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down
12 changes: 6 additions & 6 deletions resources/examples/Showtimes/compiled/1.1.3/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ paths:
304:
description: 'If no content has been modified since the supplied Last-Modified header.'
404:
description: "* If the movie could not be found.\n* For no reason.\n* For some other reason."
description: "If the movie could not be found.\n\nFor no reason.\n\nFor some other reason."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -180,7 +180,7 @@ paths:
201:
description: 'Standard request.'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -216,7 +216,7 @@ paths:
304:
description: 'If no content has been modified since the supplied Last-Modified header.'
404:
description: "* If the movie could not be found.\n* For no reason.\n* For some other reason."
description: "If the movie could not be found.\n\nFor no reason.\n\nFor some other reason."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -326,19 +326,19 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
$ref: '#/components/schemas/error'
404:
description: "* If the movie could not be found.\n* If the trailer URL could not be validated."
description: "If the movie could not be found.\n\nIf the trailer URL could not be validated."
content:
application/mill.example.movie+json:
schema:
$ref: '#/components/schemas/error'
403:
description: "* Error code 1337: If something cool happened.\n* Error code 666: If the user is not allowed to edit that movie."
description: "Error code 1337: If something cool happened.\n\nError code 666: If the user is not allowed to edit that movie."
content:
application/mill.example.movie+json:
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ paths:
304:
description: 'If no content has been modified since the supplied Last-Modified header.'
404:
description: "* If the movie could not be found.\n* For no reason.\n* For some other reason."
description: "If the movie could not be found.\n\nFor no reason.\n\nFor some other reason."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -178,7 +178,7 @@ paths:
201:
description: 'Standard request.'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -214,7 +214,7 @@ paths:
304:
description: 'If no content has been modified since the supplied Last-Modified header.'
404:
description: "* If the movie could not be found.\n* For no reason.\n* For some other reason."
description: "If the movie could not be found.\n\nFor no reason.\n\nFor some other reason."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -324,19 +324,19 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
$ref: '#/components/schemas/error'
404:
description: "* If the movie could not be found.\n* If the trailer URL could not be validated."
description: "If the movie could not be found.\n\nIf the trailer URL could not be validated."
content:
application/mill.example.movie+json:
schema:
$ref: '#/components/schemas/error'
403:
description: "* Error code 1337: If something cool happened.\n* Error code 666: If the user is not allowed to edit that movie."
description: "Error code 1337: If something cool happened.\n\nError code 666: If the user is not allowed to edit that movie."
content:
application/mill.example.movie+json:
schema:
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/Showtimes/compiled/1.1/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down Expand Up @@ -346,7 +346,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down Expand Up @@ -344,7 +344,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
2 changes: 1 addition & 1 deletion resources/examples/Showtimes/compiled/public/1.0/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/Showtimes/compiled/public/1.1.1/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down Expand Up @@ -279,7 +279,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/Showtimes/compiled/public/1.1.2/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -279,7 +279,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down
8 changes: 4 additions & 4 deletions resources/examples/Showtimes/compiled/public/1.1.3/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ paths:
201:
description: 'Standard request.'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -180,7 +180,7 @@ paths:
304:
description: 'If no content has been modified since the supplied Last-Modified header.'
404:
description: "* If the movie could not be found.\n* For no reason.\n* For some other reason."
description: "If the movie could not be found.\n\nFor no reason.\n\nFor some other reason."
content:
application/mill.example.movie+json:
schema:
Expand Down Expand Up @@ -287,13 +287,13 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/mill.example.movie+json:
schema:
$ref: '#/components/schemas/error'
404:
description: "* If the movie could not be found.\n* If the trailer URL could not be validated."
description: "If the movie could not be found.\n\nIf the trailer URL could not be validated."
content:
application/mill.example.movie+json:
schema:
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/Showtimes/compiled/public/1.1/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down Expand Up @@ -275,7 +275,7 @@ paths:
schema:
$ref: '#/components/schemas/movie'
400:
description: "* If there is a problem with the request.\n* If the IMDB URL could not be validated."
description: "If there is a problem with the request.\n\nIf the IMDB URL could not be validated."
content:
application/json:
schema:
Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/Specification/OpenApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ protected function processResponses(Action\Documentation $action): array
// into a Markdown list.
if ($total_responses > 1) {
$description = implode(
$this->line(),
$this->line(2),
array_map(function (string $desc): string {
return sprintf('* %s', $desc);
return sprintf('%s', $desc);
}, $data['descriptions'])
);
} else {
Expand Down

0 comments on commit 2ffe828

Please sign in to comment.