Open wohali opened 4 years ago
We do currently add the language property to DDoc. When did you encounter that it was not filled?
@popojargo Looks like this is just a confusing option in the menu. See this screenshot:
Picking the ➕ icon on the Design Documents row, then picking "Add New Doc" I would have expected to create a design document template for me. Instead, it's the same as clicking the ➕ next to All Documents.
Personally, I would either drop the "Add new doc" option from the ddocs menu, or have it auto-create a dummy template ddoc with all the empty sections in it. (This is a common complaint we get - "What is the full structure of a raw ddoc?" - we should maybe give a UI for this, but this is an enhancement request.)
I'll update the title of this bug.
Something like this?
{
"_id": "_design/new-ddoc",
"language": "javascript",
"views": {},
"updates": {},
"filters": {}
}
@wohali
@popojargo Yes, this is the idea.
VDUs should also be included.
Don't add shows/lists as they are going away.
Current Behaviour
Right now, creating a ddoc in Fauxton is just like creating any other document. You get a new
_id
value, but nothing else.Since ddocs are largely written in JavaScript, and anyone using another language will know to put a different language in there, consider adding the
"language": "javascript"
key to a new ddoc by default.Expected Behaviour
All ddocs in CouchDB have the "language" key/value pair filled in.