cwacek/python-jsonschema-objects

Bug: Missing AnvilBase Attribute

kacperpaczos opened this issue · 3 comments

Describe the bug
I am encountering an issue with a JSON schema. In the schema, I have the following entry:
"title": "AnvilBase"
According to the namespace, there should be a corresponding attribute:
AnvilBase = ns.AnvilBase
However, it appears that this attribute is missing, resulting in the following error:

l.py", line 146, in __getattribute__
    raise AttributeError(msg % (type(self).__name__, name))
AttributeError: 'Namespace' object has no attribute 'AnvilBase'. Did you mean: 'Anvilbase'?

This is not a bug. See comment closing #273

So, please add a table of possible titles and transform it into code in the documentation. Otherwise, I will do it later.

The way names are transformed is already described in the README. See https://github.com/cwacek/python-jsonschema-objects?tab=readme-ov-file#accessing-generated-objects.

See the note about passing standardized_names=False if you don't want it to change the titles.