diff --git a/.changeset/short-moose-serve.md b/.changeset/short-moose-serve.md new file mode 100644 index 00000000..241cdd34 --- /dev/null +++ b/.changeset/short-moose-serve.md @@ -0,0 +1,5 @@ +--- +"@openapi-generator-plus/plain-documentation-generator": minor +--- + +Restructure headings diff --git a/packages/plain-documentation/less/style.less b/packages/plain-documentation/less/style.less index 544942ae..09b5b75f 100755 --- a/packages/plain-documentation/less/style.less +++ b/packages/plain-documentation/less/style.less @@ -74,10 +74,6 @@ h4 { line-height: @lh-title4; font-weight: 200; margin: 0; - - .operation & { - font-weight: 700; - } } h5 { @@ -184,10 +180,6 @@ body.api-docs { nav { border-right: 1px solid @ui-border; .grid(5, 6); - - li:not(.expandable) a { - font-weight: 700; - } } } diff --git a/packages/plain-documentation/templates/api/group.hbs b/packages/plain-documentation/templates/api/group.hbs index ee74a8d7..4ac3d595 100644 --- a/packages/plain-documentation/templates/api/group.hbs +++ b/packages/plain-documentation/templates/api/group.hbs @@ -3,7 +3,7 @@ --}} -

{{capitalize name}}

+

{{sentenceCase name}}

{{#eachSorted operations}} {{>api/operation .}} {{/eachSorted}} diff --git a/packages/plain-documentation/templates/api/operation.hbs b/packages/plain-documentation/templates/api/operation.hbs index 259aedaa..aa9cab5a 100644 --- a/packages/plain-documentation/templates/api/operation.hbs +++ b/packages/plain-documentation/templates/api/operation.hbs @@ -8,9 +8,7 @@ --}}
-

{{name}}

- -
{{upperCase httpMethod}} {{fullPath}}
+

{{upperCase httpMethod}} {{fullPath}}

{{>hooks/operation-header}} @@ -21,6 +19,18 @@ {{{md summary "true"}}} {{{md description}}} +
+
Operation ID
+ + + + + +
+ {{name}} +
+
+ {{>api/security-requirements}} {{>api/request-body}} {{>api/parameters parameters=parameters}} diff --git a/packages/plain-documentation/templates/api/security-requirements.hbs b/packages/plain-documentation/templates/api/security-requirements.hbs index 27821fcd..69c07a0c 100644 --- a/packages/plain-documentation/templates/api/security-requirements.hbs +++ b/packages/plain-documentation/templates/api/security-requirements.hbs @@ -7,7 +7,7 @@ {{#each schemes}} {{scheme.type}} - + {{#each scopes}} {{name}}{{#hasMore}},{{/hasMore}} {{/each}} diff --git a/packages/plain-documentation/templates/api/security-scheme.hbs b/packages/plain-documentation/templates/api/security-scheme.hbs index f98173c8..fd933420 100644 --- a/packages/plain-documentation/templates/api/security-scheme.hbs +++ b/packages/plain-documentation/templates/api/security-scheme.hbs @@ -32,7 +32,7 @@ {{else if isOAuth}} {{#each flows}} -

{{capitalize type}} flow

+

{{sentenceCase type}} flow

{{#if authorizationUrl}} diff --git a/packages/plain-documentation/templates/model/all-of.hbs b/packages/plain-documentation/templates/model/all-of.hbs index edec1626..c1fa5361 100644 --- a/packages/plain-documentation/templates/model/all-of.hbs +++ b/packages/plain-documentation/templates/model/all-of.hbs @@ -2,7 +2,7 @@ renders a model "allOf"-definition. }}
-
All of
+

All of

{{#each composes}} {{#unless anonymous}} diff --git a/packages/plain-documentation/templates/model/any-of.hbs b/packages/plain-documentation/templates/model/any-of.hbs index 900d3d8a..be5a529f 100644 --- a/packages/plain-documentation/templates/model/any-of.hbs +++ b/packages/plain-documentation/templates/model/any-of.hbs @@ -2,7 +2,7 @@ renders a model "anyOf"-definition. }}
-
Any of
+

Any of

{{#each composes}}

{{nativeType}}

diff --git a/packages/plain-documentation/templates/model/children.hbs b/packages/plain-documentation/templates/model/children.hbs index 563c7c80..323dd4e5 100644 --- a/packages/plain-documentation/templates/model/children.hbs +++ b/packages/plain-documentation/templates/model/children.hbs @@ -3,7 +3,7 @@ renders the inherited properties of a parent class. }}
-
Children
+

Children

{{#each children}}

{{nativeType}}

diff --git a/packages/plain-documentation/templates/model/discriminator.hbs b/packages/plain-documentation/templates/model/discriminator.hbs index c3f9b144..64951445 100644 --- a/packages/plain-documentation/templates/model/discriminator.hbs +++ b/packages/plain-documentation/templates/model/discriminator.hbs @@ -1,6 +1,6 @@ {{!Renders model discriminator}}
-
Discriminator
+

Discriminator

{{#with discriminator}}
@@ -25,9 +25,8 @@
{{/with}} - -
-
Discriminator values
+ +
Values
diff --git a/packages/plain-documentation/templates/model/enum.hbs b/packages/plain-documentation/templates/model/enum.hbs index 97f0c730..b32a5c3b 100644 --- a/packages/plain-documentation/templates/model/enum.hbs +++ b/packages/plain-documentation/templates/model/enum.hbs @@ -1,5 +1,5 @@
-
Values
+

Values

[ {{#each enumValues}} diff --git a/packages/plain-documentation/templates/model/implements.hbs b/packages/plain-documentation/templates/model/implements.hbs index f667e062..7501363e 100644 --- a/packages/plain-documentation/templates/model/implements.hbs +++ b/packages/plain-documentation/templates/model/implements.hbs @@ -3,7 +3,7 @@ renders the inherited properties of a parent class. }}
-
Implements
+

Implements

{{#each implements}}

{{nativeType}}

diff --git a/packages/plain-documentation/templates/model/inherited.hbs b/packages/plain-documentation/templates/model/inherited.hbs index 06c884cc..6dad8368 100644 --- a/packages/plain-documentation/templates/model/inherited.hbs +++ b/packages/plain-documentation/templates/model/inherited.hbs @@ -3,14 +3,14 @@ renders the inherited properties of a parent class. }}
-
Parent
+

Parent

{{#if properties}}
-
Inherited Properties
+

Inherited Properties

{{>model/frag/inherited}}
diff --git a/packages/plain-documentation/templates/model/interface.hbs b/packages/plain-documentation/templates/model/interface.hbs index 260a4821..f8c194ab 100644 --- a/packages/plain-documentation/templates/model/interface.hbs +++ b/packages/plain-documentation/templates/model/interface.hbs @@ -1,5 +1,5 @@
-
Implemented by
+

Implemented by

{{#each implementors}}

{{nativeType}}

@@ -8,7 +8,7 @@ {{#if properties}}
-
Inherited Properties
+

Inherited Properties

{{>model/frag/inherited}}
diff --git a/packages/plain-documentation/templates/model/main-panel.hbs b/packages/plain-documentation/templates/model/main-panel.hbs index e3e4ade3..94eca4f9 100644 --- a/packages/plain-documentation/templates/model/main-panel.hbs +++ b/packages/plain-documentation/templates/model/main-panel.hbs @@ -9,10 +9,10 @@ {{#ifdef hideName}} {{else}} {{#if name}} -

+

{{nativeType}} {{#if (isInterface)}}INTERFACE{{/if}} -

+ {{/if}} {{/ifdef}} diff --git a/packages/plain-documentation/templates/model/one-of.hbs b/packages/plain-documentation/templates/model/one-of.hbs index 80c27cd8..b69dd3e6 100644 --- a/packages/plain-documentation/templates/model/one-of.hbs +++ b/packages/plain-documentation/templates/model/one-of.hbs @@ -2,7 +2,7 @@ renders a model "allOf"-definition. }}
-
One of
+

One of

{{#each composes}}

{{nativeType}}

diff --git a/packages/plain-documentation/templates/model/properties.hbs b/packages/plain-documentation/templates/model/properties.hbs index bb7c0ef9..a6af206a 100644 --- a/packages/plain-documentation/templates/model/properties.hbs +++ b/packages/plain-documentation/templates/model/properties.hbs @@ -1,6 +1,6 @@ {{!Renders model object properties.}}
-
Properties
+

Properties

{{>model/frag/properties}}