Skip to content

Commit 6971eb2

Browse files
docs(api): migrating the validation utility to mkdocstrings (#5972)
Mkdocstrings - Validation module
1 parent 963e24a commit 6971eb2

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

aws_lambda_powertools/utilities/validation/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""
22
Simple validator to enforce incoming/outgoing event conforms with JSON Schema
3+
!!! abstract "Usage Documentation"
4+
[`Validation`](../utilities/validation.md)
35
"""
46

57
from .exceptions import (

aws_lambda_powertools/utilities/validation/exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(
1919
rule: str | None = None,
2020
rule_definition: Any | None = None,
2121
):
22-
"""
22+
"""When serialization fail schema validation
2323
2424
Parameters
2525
----------

docs/api_doc/validation.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- markdownlint-disable MD043 MD041 -->
2+
::: aws_lambda_powertools.utilities.validation

mkdocs.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ nav:
6262
# - Overview: contributing/tracks/overview.md
6363
# - Casual to regular contributor: contributing/tracks/casual_regular_contributor.md
6464
# - Customer to advocate: contributing/tracks/customer_advocate.md
65+
- API Documentation:
66+
- Validation: api_doc/validation.md
6567

6668
theme:
6769
name: material
@@ -144,22 +146,19 @@ plugins:
144146
import:
145147
- https://docs.python.org/3/objects.inv
146148
options:
147-
# General
148-
allow_inspection: true
149-
show_source: true
150-
show_bases: true
151149
# Headings
152-
heading_level: 2
153-
#show_root_heading: false
150+
#heading_level: 2
151+
#show_root_heading: true
154152
#show_root_toc_entry: true
155153
#show_root_full_path: true
156154
#show_root_members_full_path: false
157155
#show_object_full_path: false
158-
#show_category_heading: true
156+
show_category_heading: false
159157
# Members
160-
filters: ["!^_[^_]"]
158+
filters: ["!^_"]
161159
group_by_category: true
162-
show_submodules: false
160+
members_order: alphabetical
161+
show_submodules: true
163162
# Docstrings
164163
docstring_style: numpy
165164
docstring_options:
@@ -168,10 +167,10 @@ plugins:
168167
merge_init_into_class: true
169168
show_if_no_docstring: false
170169
# Signature
171-
annotations_path: brief
172170
show_signature: true
173171
show_signature_annotations: true
174172
separate_signature: true
173+
summary: true
175174

176175
extra_css:
177176
- stylesheets/extra.css

0 commit comments

Comments
 (0)