Sha256: 27252a71b76360f04b8f2667fba7dbd0ea25502e5b7ca23b1e7fe2431f4ebe55

Contents?: true

Size: 654 Bytes

Versions: 1

Compression:

Stored size: 654 Bytes

Contents

---
"$schema": "http://json-schema.org/draft-04/schema#"
title: <%= schema_title %>
type: object
properties:
  <%= file_name %>:
    type: object
  <%- if parameters.empty? -%>
    required:
      # - param1
      # - param2
    properties:
      # param1:
      #   type: string
      # param2:
      #   type: string
  <%- else -%>
    required:
    <%- parameters.each do |param| -%>
      <%- if param.required? -%>
      - <%= param %>
      <%- else -%>
      # - <%= param %>
      <%- end -%>
    <%- end -%>
    properties:
    <%- parameters.each do |param| -%>
      <%= param %>:
        type: <%= param.type %>
    <%- end -%>
  <%- end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
json_schema_rails-0.0.1 lib/generators/schema/action/templates/schema.yml.erb