types
#
Typings for codegen.
Classes:
Name | Description |
---|---|
CLINamespace |
Typings for namespace of |
Functions:
Name | Description |
---|---|
validate_call |
If pydantic is installed, returns |
Attributes:
Name | Type | Description |
---|---|---|
CHOASType |
A URL point to any |
|
JSONSchema |
Abstration of a JSON schema using. |
|
RemoteJsonRefPathStr |
Represents the part of a Remote JSON reference as described in |
|
SchemaFolder |
Abstration of a folder containing Schemas. |
|
URLSchemeType |
A valid url scheme supported by codegen. |
CHOASType
module-attribute
#
CHOASType = Union[CHOAS, Literal['https://developer-specs.company-information.service.gov.uk/companies-house-identity-service/reference', 'https://developer-specs.company-information.service.gov.uk/companies-house-public-data-api/reference', 'https://developer-specs.company-information.service.gov.uk/discrepancies/reference', 'https://developer-specs.company-information.service.gov.uk/document-api/reference', 'https://developer-specs.company-information.service.gov.uk/manipulate-company-data-api-filing/reference', 'https://developer-specs.company-information.service.gov.uk/sandbox-test-data-generator-api/reference', 'https://developer-specs.company-information.service.gov.uk/streaming-api/reference']]
A URL point to any Companies House OpenAPI (Swagger 2.0) Specfication.
See Also
CHOAS
: enum of available Swagger 2.0 specfications.
RemoteJsonRefPathStr
module-attribute
#
Represents the part of a Remote JSON reference as described in
Using $ref | Swagger Docs <https://swagger.io/docs/specification/v3_0/using-ref>
_.
SchemaFolder
module-attribute
#
SchemaFolder = MutableMapping[RemoteJsonRefPathStr, JSONSchema]
Abstration of a folder containing Schemas.
A dictionary mapping Remote JSON Reference file paths (as strings) to dicts representing JSON data.
URLSchemeType
module-attribute
#
URLSchemeType = Union[URLScheme, Literal['http', 'https', 'ftp', 'ftps']]
A valid url scheme supported by codegen.
CLINamespace
dataclass
#
CLINamespace(input: str, select: Sequence[ReFormatFlags] = (TYPE_DATE_TO_STRING, TYPE_LIST_TO_ARRAY, TYPE_INFER_BOOLEANS, TYPE_ARRAY_ENSURE_ITEMS, PATHS_ENSURE_SNAKECASE, PARAM_PARAMTYPE_TO_IN, PARAM_TITLE_TO_NAME), ignore: Sequence[ReFormatFlags] = (), extract: Path | None = None, zip: IO[str] = stdout, openapi: bool = False, serve: tuple[str, int] | None = None, silent: bool = False, threaded: bool = True, diff: bool = False, verbose: bool = False)
Typings for namespace of companies-house-codegen
command-line interface.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
URL of a Companies House Swagger Specification from the Companies House Developer's API Suite. See: companies_house_codegen.constants.CHOAS or https://developer-specs.company-information.service.gov.uk for more info. |
required |
|
Sequence[ReFormatFlags]
|
Space-separated list of rule codes to enable. See, companies_house_codegen.constants.ReFormatFlags for more info on available flags. |
(TYPE_DATE_TO_STRING, TYPE_LIST_TO_ARRAY, TYPE_INFER_BOOLEANS, TYPE_ARRAY_ENSURE_ITEMS, PATHS_ENSURE_SNAKECASE, PARAM_PARAMTYPE_TO_IN, PARAM_TITLE_TO_NAME)
|
|
Sequence[ReFormatFlags]
|
Space-separated list of rule codes to disable. Note, ignored rules have higher priority than slected rules from |
()
|
|
Path | None
|
When specified, save specification files as to a directory. |
None
|
|
IO[str]
|
Output as single file. Outputs as to stdout otherwise |
stdout
|
|
bool
|
Convert Swagger specification to OpenAPI. |
False
|
|
tuple[str, int] | None
|
When specified, creates a local HTTP server. By default, serves on 127.0.0.1:10000. This can be overidden by passing an argument argument |
None
|
|
bool
|
Stop emitting all non-critical output. Error messages will still be emitted (which can silenced by 2>/dev/null). |
False
|
|
bool
|
Download syncronously on a single thread. By default, downloads syncronously using multithreading. Useful for debugging. |
True
|
|
bool
|
Logs the difference between pre and post formatting. Note, will be ignored if the |
False
|
|
bool
|
Use verbose debug logging |
False
|
Notes
Generated using
generate_namespace_typing<https://mmurape.github.io/companies-house-codegen/developement/typings_suite/#typings_suite.generate_cli_ns>
_
See Also
https://mmurape.github.io/companies-house-codegen/developement/typings_suite/#typings_suite.generate_cli_ns
validate_call
#
If pydantic is installed, returns pydantic.validate_call(func)
,
a decorated wrapper around the function that validates the arguments.