Project

General

Profile

« Previous | Next » 

Revision d076d573

Added by Joseph Magen over 11 years ago

  • ID d076d5731d733bbc6210c81d3b11ed7d2ba8b9d7

This commit adds most of the functionality required for API v1

The overall goal was to extract the existing JSON response
overall controllers, and to move them to a seperate name space.

  • documentation was added to all requests (available under /apidoc)
    this include same request and response generated using
    APIPIE_RECORD=examples rake test:api
  • Also Fixes #1800, fixes #1419, fixes #981 and fixes #1774

whats missing:

1. Permissions checks for all new controllers
2. Nested routes (e.g. /hosts/id/reports)
3. running tests with oauth/basic_auth (instead of as_admin {get /})

View differences:

app/views/api/v1/subnets/index.json.rabl
collection @subnets
extends "api/v1/subnets/show"
attributes :id, :name, :network, :mask, :priority, :vlanid,
:gateway, :dns_primary, :dns_secondary, :from, :to, :domain_ids,
:dns_id, :dhcp_id, :tftp_id

Also available in: Unified diff