Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
5de23256
Commit
5de23256
authored
9 years ago
by
Joshua Colp
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "rest-api-templates: Wikify error code response reasons"
parents
27e0430f
b425850f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rest-api-templates/api.wiki.mustache
+1
-1
1 addition, 1 deletion
rest-api-templates/api.wiki.mustache
rest-api-templates/asterisk_processor.py
+2
-0
2 additions, 0 deletions
rest-api-templates/asterisk_processor.py
with
3 additions
and
1 deletion
rest-api-templates/api.wiki.mustache
+
1
−
1
View file @
5de23256
...
@@ -67,7 +67,7 @@ h3. Header parameters
...
@@ -67,7 +67,7 @@ h3. Header parameters
h3. Error Responses
h3. Error Responses
{{#
error_responses
}}
{{#
error_responses
}}
*
{{
code
}}
-
{{{
reason
}}}
*
{{
code
}}
-
{{{
wiki_
reason
}}}
{{/
error_responses
}}
{{/
error_responses
}}
{{/
has_error_responses
}}
{{/
has_error_responses
}}
{{/
operations
}}
{{/
operations
}}
...
...
This diff is collapsed.
Click to expand it.
rest-api-templates/asterisk_processor.py
+
2
−
0
View file @
5de23256
...
@@ -199,6 +199,8 @@ class AsteriskProcessor(SwaggerPostProcessor):
...
@@ -199,6 +199,8 @@ class AsteriskProcessor(SwaggerPostProcessor):
raise
SwaggerError
(
"
Summary should end with .
"
,
context
)
raise
SwaggerError
(
"
Summary should end with .
"
,
context
)
operation
.
wiki_summary
=
wikify
(
operation
.
summary
or
""
)
operation
.
wiki_summary
=
wikify
(
operation
.
summary
or
""
)
operation
.
wiki_notes
=
wikify
(
operation
.
notes
or
""
)
operation
.
wiki_notes
=
wikify
(
operation
.
notes
or
""
)
for
error_response
in
operation
.
error_responses
:
error_response
.
wiki_reason
=
wikify
(
error_response
.
reason
or
""
)
operation
.
parse_body
=
(
operation
.
body_parameter
or
operation
.
has_query_parameters
)
and
True
operation
.
parse_body
=
(
operation
.
body_parameter
or
operation
.
has_query_parameters
)
and
True
def
process_parameter
(
self
,
parameter
,
context
):
def
process_parameter
(
self
,
parameter
,
context
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment