docson
docson copied to clipboard
Support of `required` keyword
Please add support of required
keyword. It would be nice to have some little label near field name, that is in the 'required array'
Unless I’m misunderstanding the request, this is already supported (and has been for a long time). Maybe the bold font used for it is not noticeable enough? One version I have lying around here adds an asterisk, but I can’t find that in any Git revision, so maybe I added it myself?
diff --git a/public/css/docson.css b/public/css/docson.css
index e315b22..803566a 100644
--- a/public/css/docson.css
+++ b/public/css/docson.css
@@ -181,8 +181,13 @@
.docson .required {
font-weight: bold;
}
+.docson .required:after {
+ content: " *";
+ color: #880000;
+}
+
.docson .type-keyword {
font-size: 80%;
color: dimgray;
}
Oh, and, probably a duplicate of #30.