-
Notifications
You must be signed in to change notification settings - Fork 55
YAML inheritance #53
Copy link
Copy link
Open
Description
Is there any way to DRY up the fdoc response YAML files? I'd love to use something like YAML inheritance, but it doesn't seem to work.
I find myself constantly copy pasting YAMLs across PUT/POST/GET actions
it would be nice to somehow declare a base and have it shared across files
blogPostProperties: &blogPost
title:
description: the post title
required: yes
type: string
example: Hello World Post!
published:
description: is it published?
required: yes
type: boolean
example: falseThen, elsewhere in (another file) inherit the properties
# fdoc/blogPosts/:id-GET.fdoc
# ...
responseParameters:
properties:
blogPost:
description: the post
required: true
type: object
properties: *blogPost
# include the base properties, then additionally include some others
created_at:
description: the date created
required: true
type: date
example: 'TODAY'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels