# How rest-api-spec is being generated?

**URL:** <https://discuss.elastic.co/t/how-rest-api-spec-is-being-generated/38612>\
**Category:** Elasticsearch\
**Created:** [January 7, 2016, 12:37pm UTC](https://discuss.elastic.co/t/how-rest-api-spec-is-being-generated/38612 "2016-01-07T12:37:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugene\_pirogov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eugene_pirogov/32/4599_2.png) [@eugene\_pirogov](https://discuss.elastic.co/u/eugene_pirogov)\
**Post date:** [January 7, 2016, 12:37pm UTC](https://discuss.elastic.co/t/how-rest-api-spec-is-being-generated/38612/1 "2016-01-07T12:37:32Z")

</div>

In this PR – [https://github.com/elastic/elasticsearch/pull/14247/files](https://github.com/elastic/elasticsearch/pull/14247/files) I see the rest-api-spec JSON files being added. Are they written manually or automatically? I am very suspicious they are generated automatically. Could someone point me to the code that gets them generated?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [January 7, 2016, 12:53pm UTC](https://discuss.elastic.co/t/how-rest-api-spec-is-being-generated/38612/2 "2016-01-07T12:53:25Z")

</div>

They often receive a fair bit of copy and paste but they are written by  
hand. They exist so elasticsearch can share tests with its clients.

---

<div class="post-metadata">

**Author:** ![eugene\_pirogov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eugene_pirogov/32/4599_2.png) [@eugene\_pirogov](https://discuss.elastic.co/u/eugene_pirogov)\
**Post date:** [January 8, 2016, 3:19pm UTC](https://discuss.elastic.co/t/how-rest-api-spec-is-being-generated/38612/3 "2016-01-08T15:19:30Z")

</div>

Thank you Nik.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:25pm UTC](https://discuss.elastic.co/t/how-rest-api-spec-is-being-generated/38612/4 "2017-07-05T23:25:58Z")

</div>


