Documents an individual method :param section: The section to write to :param method_name: The name of the method :param operation_model: The model of the operation :param event_emitter: The event emitter to use to emit events :param example_prefix: The prefix to use in the
(
section,
method_name,
operation_model,
event_emitter,
method_description=None,
example_prefix=None,
include_input=None,
include_output=None,
exclude_input=None,
exclude_output=None,
document_output=True,
include_signature=True,
)
| 136 | |
| 137 | |
| 138 | def document_model_driven_method( |
| 139 | section, |
| 140 | method_name, |
| 141 | operation_model, |
| 142 | event_emitter, |
| 143 | method_description=None, |
| 144 | example_prefix=None, |
| 145 | include_input=None, |
| 146 | include_output=None, |
| 147 | exclude_input=None, |
| 148 | exclude_output=None, |
| 149 | document_output=True, |
| 150 | include_signature=True, |
| 151 | ): |
| 152 | """Documents an individual method |
| 153 | |
| 154 | :param section: The section to write to |
| 155 | |
| 156 | :param method_name: The name of the method |
| 157 | |
| 158 | :param operation_model: The model of the operation |
| 159 | |
| 160 | :param event_emitter: The event emitter to use to emit events |
| 161 | |
| 162 | :param example_prefix: The prefix to use in the method example. |
| 163 | |
| 164 | :type include_input: Dictionary where keys are parameter names and |
| 165 | values are the shapes of the parameter names. |
| 166 | :param include_input: The parameter shapes to include in the |
| 167 | input documentation. |
| 168 | |
| 169 | :type include_output: Dictionary where keys are parameter names and |
| 170 | values are the shapes of the parameter names. |
| 171 | :param include_input: The parameter shapes to include in the |
| 172 | output documentation. |
| 173 | |
| 174 | :type exclude_input: List of the names of the parameters to exclude. |
| 175 | :param exclude_input: The names of the parameters to exclude from |
| 176 | input documentation. |
| 177 | |
| 178 | :type exclude_output: List of the names of the parameters to exclude. |
| 179 | :param exclude_input: The names of the parameters to exclude from |
| 180 | output documentation. |
| 181 | |
| 182 | :param document_output: A boolean flag to indicate whether to |
| 183 | document the output. |
| 184 | |
| 185 | :param include_signature: Whether or not to include the signature. |
| 186 | It is useful for generating docstrings. |
| 187 | """ |
| 188 | # Add the signature if specified. |
| 189 | if include_signature: |
| 190 | document_model_driven_signature( |
| 191 | section, |
| 192 | method_name, |
| 193 | operation_model, |
| 194 | include=include_input, |
| 195 | exclude=exclude_input, |