Skip to content

Commit

Permalink
Merge pull request mashery#95 from alexadkins/master
Browse files Browse the repository at this point in the history
Enabled the use of html tags in json files.
  • Loading branch information
mansilladev committed Jun 21, 2013
2 parents 0593983 + d305f45 commit 246a916
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Copyright 2012-2013 Mashery, Inc.
SYNOPSIS
--------
I/O Docs is a live interactive documentation system for RESTful web APIs. By defining APIs at the resource, method and parameter
levels in a JSON schema, I/O Docs will generate a JavaScript client interface. API calls can be executed from this interface, which are then proxied through the I/O Docs server with payload data cleanly formatted (pretty-printed if JSON or XML).
levels in a JSON schema, I/O Docs will generate a JavaScript client interface. API calls can be executed from this interface, which are then proxied through the I/O Docs server with payload data cleanly formatted (pretty-printed if JSON or XML). Basic HTML text tags are enabled in the JSON schema.

You can find the latest version here: [https://github.com/mashery/iodocs](https://github.com/mashery/iodocs)

Expand Down
24 changes: 24 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,14 @@ li {
float: left;
}

.method .title .name span {
float: none;
}

.method .title .uri span {
float: none;
}

.method .title .uri {
color: #777;
}
Expand Down Expand Up @@ -737,6 +745,22 @@ li {
zoom: 1;
}

.foo{
color:red;
}

strong{
font-weight: bold;
}

em {
font-style:italic;
}

underline {
text-decoration:underline
}

dl {
display: block;
margin-bottom: 10px;
Expand Down
18 changes: 9 additions & 9 deletions views/api.jade
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ul
- each endpoint in apiDefinition.endpoints
li.endpoint
h3.title
span.name=endpoint.name
span.name!=endpoint.name
ul.actions
li.list-methods
a(href='#') List Methods
Expand All @@ -66,15 +66,15 @@ ul
- var secure =''
li(class='method ' + httpmethod + ' ' + secure)
div.title
span.http-method #{method.HTTPMethod}
span.name #{method.MethodName}
span.uri #{method.URI}
span.http-method !{method.HTTPMethod}
span.name !{method.MethodName}
span.uri !{method.URI}
form.hidden
input(type='hidden', name='httpMethod', value=method.HTTPMethod)
input(type='hidden', name='oauth', value=secure)
input(type='hidden', name='methodUri', value=method.URI)

span.description #{method.Synopsis}
span.description !{method.Synopsis}
br
br
- if (method.parameters.length > 0)
Expand All @@ -98,7 +98,7 @@ ul
- var required =false
- var className =''
tr(class=className)
td.name=parameter.Name
td.name!=parameter.Name
td.parameter
- if (parameter.Type =='enumerated')
select(name='params[' + parameter.Name + ']', placeholder=className)
Expand All @@ -121,11 +121,11 @@ ul
- else
input(name='params[' + parameter.Name + ']', value=parameter.Default, placeholder=className)
input(type='hidden', name='locations['+parameter.Name+']', value=parameter.Location || 'query')
td.type=parameter.Type
td.type!=parameter.Type
td.location
p=parameter.Location || 'query'
p!=parameter.Location || 'query'
td.description
p=parameter.Description || 'No description'
p!=parameter.Description || 'No description'
- if (parameter.Type =='enumerated' && parameter.EnumeratedDescription)
dl.clearfix
- each description, choice in parameter.EnumeratedDescription
Expand Down

0 comments on commit 246a916

Please sign in to comment.