Generated Akvo RSR API Content Requirements - adriancollier/demo GitHub Wiki

Generated API documentation

The list below has been generated by an XSLT transform applied to the schema output of the API (the schema has been enhanced with things like max length of text fields).

This way we can get a nicely formatted, generated output that's based on the actual current API. There's nothing that precludes post editing by hand and seems to me a much better way of creating the source for the documentation than to do it all by hand.

This is just a rough proof of concept and there's stuff missing. For example many of the help texts are generic, but can be customized by adding help text to the model fields.

Project

project_rating

  • Field type: integer
  • This field is required
  • Help text: Integer data. Ex: 2673
  • Default value: 0

subtitle

  • Field type: string
  • This field is required
  • Help text: A subtitle with more information on the project (75 characters).
  • Maximum number of characters: 75

links

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

invoices

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

date_complete

  • Field type: datetimeTrue
  • Help text: A date and time as a string. Ex: "2010-11-10T03:07:43"

locations

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

project_comments

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

currency

  • Field type: string
  • This field is required
  • Help text: Unicode string data. Ex: "Hello World"
  • Maximum number of characters: 3
  • Allowed values:
    • "USD" (value for label "$")
    • "EUR" (value for label "€")
  • Default value: EUR

id

  • Field type: integer
  • This field is required
  • Help text: Integer data. Ex: 2673
  • Default value:

title

  • Field type: string
  • This field is required
  • Help text: A short descriptive title for your project (45 characters).
  • Maximum number of characters: 45

project_updates

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

categories

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

status

  • Field type: string
  • This field is required
  • Help text: Current project state.
  • Maximum number of characters: 1
  • Allowed values:
    • "N" (value for label "None")
    • "H" (value for label "Needs funding")
    • "A" (value for label "Active")
    • "C" (value for label "Complete")
    • "L" (value for label "Cancelled")
    • "R" (value for label "Archived")
  • Default value: N

funds

  • Field type: decimalTrue
  • Help text: Fixed precision numeric data. Ex: 26.73
  • Default value: 0

project_plan_summary

  • Field type: string
  • This field is required
  • Help text: Briefly summarize the project (400 characters).
  • Maximum number of characters: 400
  • Default value:

date_request_posted

  • Field type: datetime
  • This field is required
  • Help text: A date and time as a string. Ex: "2010-11-10T03:07:43"
  • Default value: 2013-05-20

sustainability

  • Field type: string
  • This field is required
  • Help text: Describe plans for sustaining/maintaining results after implementation is complete (unlimited).
  • Default value:

goals

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

background

  • Field type: string
  • Help text: Relevant background information, including geographic, political, environmental, social and/or cultural issues (1000 characters).
  • Maximum number of characters: 1000
  • Default value:

current_image_caption

  • Field type: string
  • Help text: Enter a caption for your project picture (50 characters).
  • Maximum number of characters: 50
  • Default value:

current_image

  • Field type: string
  • Help text: The project image looks best in landscape format (4:3 width:height ratio), and should be less than 3.5 mb in size.
  • Maximum number of characters: 100
  • Default value:

budget_items

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

language

  • Field type: string
  • This field is required
  • Help text: The main language of the project
  • Maximum number of characters: 2
  • Allowed values:
    • "de" (value for label "German")
    • "en" (value for label "English")
    • "nl" (value for label "Dutch")
    • "ru" (value for label "Russki")
  • Default value: en

absolute_url

  • Field type: string
  • This field is required
  • Help text: Unicode string data. Ex: "Hello World"

notes

  • Field type: string
  • Help text: (Unlimited number of characters).
  • Default value:

project_plan

  • Field type: string
  • Help text: Detailed information about the project and plans for implementing: the what, how, who and when. (unlimited).
  • Default value:

funds_needed

  • Field type: decimalTrue
  • Help text: Fixed precision numeric data. Ex: 26.73
  • Default value: 0

budget

  • Field type: decimalTrue
  • Help text: Fixed precision numeric data. Ex: 26.73
  • Default value: 0

current_status

  • Field type: string
  • Help text: Description of current phase of project. (600 characters).
  • Maximum number of characters: 600
  • Default value:

benchmarks

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data.

goals_overview

  • Field type: string
  • This field is required
  • Help text: Describe what the project hopes to accomplish (600 characters).
  • Maximum number of characters: 600
  • Default value:

resource_uri

  • Field type: string
  • This field is required
  • Help text: Unicode string data. Ex: "Hello World"

primary_location

  • Field type: relatedTrue
  • Help text: A single related resource. Can be either a URI or set of nested resource data.

partnerships

  • Field type: related
  • This field is required
  • Help text: Many related resources. Can be either a list of URIs or list of individually nested resource data. application/json20get