質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

JSON

JSON(JavaScript Object Notation)は軽量なデータ記述言語の1つである。構文はJavaScriptをベースとしていますが、JavaScriptに限定されたものではなく、様々なソフトウェアやプログラミング言語間におけるデータの受け渡しが行えるように設計されています。

Q&A

0回答

180閲覧

jsonschemaを生成するprmdで「Meta is empty,..」と出る

tetsutail

総合スコア81

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

JSON

JSON(JavaScript Object Notation)は軽量なデータ記述言語の1つである。構文はJavaScriptをベースとしていますが、JavaScriptに限定されたものではなく、様々なソフトウェアやプログラミング言語間におけるデータの受け渡しが行えるように設計されています。

0グッド

0クリップ

投稿2017/09/13 15:34

prmdを使っているのですが、
bundle exec prmd init --yaml website > docs/schema/schemata/yml/website.yml
で生成したwebsite.ymlを以下のように変更しました。

yaml

1--- 2"$schema": http://json-schema.org/draft-04/hyper-schema 3title: Website 4description: WebSite Data API 5stability: prototype 6strictProperties: true 7type: 8- object 9definitions: 10 id: 11 description: unique identifier of website 12 example: 1 13 readOnly: true 14 #format: uuid 15 type: 16 - integer #string 17 title: 18 description: unique title of website 19 example: "exampleのサイト" 20 readOnly: true 21 type: 22 - string 23 url: 24 description: unique url of website 25 example: "https://example.com/" 26 readOnly: true 27 type: 28 - string 29 description: 30 description: unique description of website 31 example: "このサイトはexampleが作ったサイトです" 32 readOnly: true 33 type: 34 - string 35 created_at: 36 description: when website was created 37 format: date-time 38 type: 39 - string 40 updated_at: 41 description: when website was updated 42 format: date-time 43 type: 44 - string 45links: 46- description: Create a new website data. 47 href: "/websites" 48 method: POST 49 rel: create 50 schema: 51 properties: {} 52 type: 53 - object 54 title: Create 55- description: Delete an existing website. 56 href: "/websites/{(%2Fschemata%2Fwebsite%23%2Fdefinitions%2Fidentity)}" 57 method: DELETE 58 rel: destroy 59 title: Delete 60- description: Info for existing website. 61 href: "/websites/{(%2Fschemata%2Fwebsite%23%2Fdefinitions%2Fidentity)}" 62 method: GET 63 rel: self 64 title: Info 65- description: List existing websites. 66 href: "/websites" 67 method: GET 68 rel: instances 69 title: List 70- description: Update an existing website. 71 href: "/websites/{(%2Fschemata%2Fwebsite%23%2Fdefinitions%2Fidentity)}" 72 method: PATCH 73 rel: update 74 schema: 75 properties: {} 76 type: 77 - object 78 title: Update 79properties: 80 created_at: 81 "$ref": "/schemata/website#/definitions/created_at" 82 id: 83 "$ref": "/schemata/website#/definitions/id" 84 titie: 85 "$ref": "/schemata/website#/definitions/title" 86 url: 87 "$ref": "/schemata/website#/definitions/url" 88 description: 89 "$ref": "/schemata/website#/definitions/description" 90 updated_at: 91 "$ref": "/schemata/website#/definitions/updated_at" 92id: schemata/website 93

そして、以下のコマンドを実行すると、
$ bundle exec prmd combine docs/schema/schemata/yml/website.yml > docs/schema/schemata/json/website.json

Meta is empty, please fill it next time.

というように出ました。
githubでMeta is empty,..を出力している該当箇所のコードも見てみましたが、よく意味がわかりませんでした。

質問としては、

  • metaとは一体なんなのでしょうか?
  • このメッセージは、何か問題があるということなのでしょうか?

ということになります。もしわかる方いましたら、ご回答よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問