From 987e83c1103f2bc5874c7a0d8a50fd9341ed78a1 Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Wed, 29 Dec 2021 17:30:34 +0100 Subject: [PATCH] recursive yaml loading; readme text; minor refactoring --- README.md | 46 +++++++++++++++++++++++- src/yamlhttpforms/__init__.py | 1 + src/yamlhttpforms/form.py | 67 ++++++++++++++++++++++++++--------- 3 files changed, 96 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 6467731..162a795 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,47 @@ # HTTP forms defined in YAML -... +This module allows creating simple interfaces to forms/payloads for use in HTTP POST requests by defining them in highly readable and easily maintainable YAML files. + +## Form definition + +A form is defined by its fields. + +A field is defined by an **alias** (for internal use) and the field's **name**, which is the parameter name in the payload sent during a `POST` request, and which typically corresponds to the `name` attribute of a `` HTML tag. + +Optionally, a field can have a **default** value, value **options** (as `