Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support optional properties in resource types (not just methods) & traits #43

Open
econchick opened this issue Aug 22, 2015 · 0 comments
Labels
Milestone

Comments

@econchick
Copy link
Contributor

Currently, ramlfications only supports an optional method parameter within ResourceTypes (e.g. get?, post?, yet the RAML spec allows support for all non-scalar properties within a resource type and a trait.

For example:

# <--snip-->
resourceTypes:
  - gizmoType:
      description: get-method resource type example
      usage: Some sort of usage description
      get:
        description: This description should be inherited when applied to resources
        headers?:
          X-Inherited-Header:
            description: This header should be inherited
/a-gizmo-resource
  type: gizmoType
  get:
    description: foo
    headers:
      X-Gizmo-Header:
        description: Here is a gizmo header

Here the headers under gizmoType are denoted as optional (with the ?) but does not actually get carried down into the /a-gizmo-resource as it explicitly defines headers (shouldn't be exclusive one or the other, either).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant