aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/openapi
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-12-30 09:20:58 +0100
committerBjørn Erik Pedersen <[email protected]>2023-01-04 18:01:26 +0100
commite402d91ee199afcace8ae75da6c3587bb8089ace (patch)
treea0f51de9707ed03aa1a3d7a9195fd9d0fceab108 /tpl/openapi
parent3c51625c7152abca7e035fae15fc6807ca21cc86 (diff)
downloadhugo-e402d91ee199afcace8ae75da6c3587bb8089ace.tar.gz
hugo-e402d91ee199afcace8ae75da6c3587bb8089ace.zip
Misc doc, code refactoring to improve documentation
Diffstat (limited to 'tpl/openapi')
-rw-r--r--tpl/openapi/docs.go2
-rw-r--r--tpl/openapi/openapi3/openapi3.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/tpl/openapi/docs.go b/tpl/openapi/docs.go
new file mode 100644
index 000000000..bb7ed9c75
--- /dev/null
+++ b/tpl/openapi/docs.go
@@ -0,0 +1,2 @@
+// Package openapi provides functions for generating OpenAPI (Swagger) documentation.
+package openapi
diff --git a/tpl/openapi/openapi3/openapi3.go b/tpl/openapi/openapi3/openapi3.go
index 9b84e9fbe..31d56289e 100644
--- a/tpl/openapi/openapi3/openapi3.go
+++ b/tpl/openapi/openapi3/openapi3.go
@@ -11,6 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// Package openapi3 provides functions for generating OpenAPI v3 (Swagger) documentation.
package openapi3
import (
@@ -54,6 +55,7 @@ type OpenAPIDocument struct {
*kopenapi3.T
}
+// Unmarshal unmarshals the given resource into an OpenAPI 3 document.
func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*OpenAPIDocument, error) {
key := r.Key()
if key == "" {