16 Commits

Author SHA1 Message Date
jichenjc
e9cb0aa036 Fix os-service related reference missing
"Delete a service " API returns 204 as success, 404 is error
Also some reference to doc it not correct

Part of bp:api-ref-in-rst

Change-Id: Ibf57167ae70acdaa2ad6f0abc3a975c91e797b87
2016-03-23 10:25:11 +08:00
Sean Dague
138a3eae7d clean up versions.inc reference document
This fixes a number of issues in the versions.inc reference
document.

Documents all the useful parameters in the response (we really need to
do something about the ones that are not).

Fix links to samples content, and write some text explaining them.

Parametrize the {api_version} GET call, it was weird to list all the
hard coded values there.

Add a couple of inline todos for longer additional references we
should do.

Part of bp:api-ref-in-rst

Change-Id: I56e5e922fca39453d0d9fc062a84daba7cad8cc1
2016-04-15 11:44:00 -07:00
Sean Dague
40630d731b Collection of CSS fixes
This ensures all parameter tables are 100% wide, even if they have
only a few items with short descriptions. It makes all the tables the
same width.

This moves the link icon into the gutter for the main content, and
makes it hidden by default (only visible on hover) like in the API
site today.

This makes the link + method name div be ``white-space: nowrap`` to
ensure that when the screen gets narrower the Delete button doesn't
fold up on itself.

Part of bp:api-ref-in-rst

Change-Id: I3892e6c8e3c01956d63a33603ba1bf9146d21161
2016-04-15 12:18:44 -04:00
Sean Dague
9526462326 move sphinx h3 to '-' instead of '^'
In the sphinx document h3 is supposed to be '-' not '^':

=, for sections
-, for subsections
^, for subsubsections

We have to enforce consistency here because we're processing included
files which all have to agree, otherwise it's a sphinx error.

Part of bp:api-ref-in-rst

Change-Id: Ic6eef5cacb07870f161b04b031e332f2b87aeedc
2016-04-15 07:43:06 -04:00
Sean Dague
ccee8b3c13 fix blockquote font size
The blockquote font size is 17.5px in bootstrap where normal text is
14px. This is because blockquote is thought of for doing pull
quotes. However sphinx uses block quote for indented text, and it
should thus be the same as the body text.

Part of bp:api-ref-in-rst

Change-Id: I4135686416d84f5ca113a031534c3486a4c2b1c5
2016-04-15 07:43:06 -04:00
Sean Dague
e51b8f43e1 Add 'Show All' / 'Hide All' toggle
This adds a global control that does show / hide of all collapseable
sections. Which is extremely useful in seeing the entire API at once.

Part of bp:api-ref-in-rst

Change-Id: I814e6b2c20c25bf3d4cb4e722bc8157ca0aa1b89
2016-04-15 07:43:06 -04:00
Sean Dague
19712dccce use 'required' instead of 'optional' for parameters
In swagger the attribute for required/optional is 'required', so we've
decided that's a better way to specify our parameters. This changes
the sphinx parser to use that when inserting (optional) into the
table.

We also make all 'path' parameters required, because we never specify
them in a table where they are not. I think them all being required:
false was an artifact of the data processing.

Part of bp:api-ref-in-rst

Change-Id: Ie2d012741d69430546fe1b10c9f16c853acb926a
2016-04-15 07:43:06 -04:00
Sean Dague
5bc00aac40 Fix css references to the glyphicons font
The bootstrap css uses the glyphicons font, but sphinx can't put it
exactly in the same place that bootstrap wants it. So fix the
minimized css to make it available and include those fonts in our
tree.

Part of bp:api-ref-in-rst

Change-Id: Ib45b90966ce12194fcb571c2782b1baed7af2471
2016-04-15 07:43:06 -04:00
Karen Bradshaw
aa9a270159 Fix formatting of rst in parameters.yaml
Change-Id: Ia30d1922a756f4bfefd997ab34c799e1919f2540
2016-04-14 14:35:08 -04:00
Sean Dague
9e305c2508 cleanup some issues in parameters.yaml
Change-Id: I47334dab81790573f5f656682e3113bed44d2cc4
2016-04-13 07:55:53 -04:00
Sean Dague
d4e2771440 Import RST files for documentation
This is the results of the RST conversion from WADL. It creates a
single index plus a bunch of included files which represent sections
of the API document. This is the starting point for fixing the
documentation.

Change-Id: I7d561c2ecdcd864172dedb54a551f17ad3bdfe26
2016-04-13 07:34:45 -04:00
Sean Dague
f1fa7eb15a add combined parameters.yaml file
This is the output of fairy-slipper conversion, merged into a single
file, with some error collision put into place. This will require some
unwinding of content because of the collisions that exist in keys, but
that can be done manually post import.

Change-Id: I430ed66728a6ac009f23e6ff8a65a3ec01c21327
2016-04-13 07:34:09 -04:00
Sean Dague
10a422ab3c increase error handling for dirty files
In working on converting data over to this new format, it will often
show up dirty with things like a broken reference to the parameters
file. We can make the parser be a bit more robust to these errors and
explain what is going on both in a warning, and in the final document.

Change-Id: I9cd44bddffadd20bfe4f3c12f2102f7e9a69c909
2016-04-11 09:11:03 -04:00
Sean Dague
cbf49a307e Enhanced error handling for rest_parameters parser
Instead of throwing a KeyError if the lookup file isn't what we
expected, and dying, throw a warning and skip the key in content. This
makes it a bit easier to understand what's wrong and how to address it
for people not familiar with the code.

Change-Id: I0d1cb60b5a1010d00e5290f697bbde601fd5f221
2016-04-01 08:05:35 -04:00
Sean Dague
329898ffbc Add sample API content
This adds sample API content for versions and servers resources,
including the parameters.yaml that is needed in both of these cases.

It also makes a new tox.ini target 'api-ref' for building these docs,
which will be used as part of the publishing pipeline.

Change-Id: I310ed352dc5dd81d01f2fd5f1a2fab662c29f0dc
2016-03-29 16:35:33 -04:00
Sean Dague
68ec070645 Create api-ref docs site
This creates a stub for landing content to support having the source
for the api-ref site in our source tree. It includes a new sphinx
extension that will be used to generate the html needed for the site
which supports 2 new stanzas:

 .. rest_parameters::

This uses a parameters yaml file to look up the definitions of
parameters and produce a structured table of those parameters and how
they are used.

 .. rest_method::

This is a stanza used inside a section which specifies the REST method
(i.e. GET /servers/{id}) which is then used to produce a nice
collapsable section.

This uses quite a bit of the sphinx extension API, and tries to
document any non obvious actions.

This extension needs additional styling from bootstrap, and some
custom js / css to do the theming / collapsing. That's included as
part of this.

Change-Id: I41b568b782d3c85f6ef8d3bb3a6f4ae378e4dc33
2016-03-29 16:35:33 -04:00