Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
v2.0.1 - 2020-12-08¶
Added¶
Add version, title and description (if defined) into the JSON OpenAPI specification stored with the package generated by the build module.
v2.0.0 - 2020-11-15¶
Added¶
Add check enforcing unique
x-tablename
values. #189Add check enforcing unique
x-secondary
values. #189Add custom association schemas validation #189
Add support for custom association tables #189
Add
openalchemy
CLI with a first sub command to build a Python package from a specification file. #201Add a CLI sub command to regenerate models. #202
Add support for database default values using
x-server-default
. #196
Changed¶
Change the association table to no longer be noted on the models based on the
x-secondary
value and instead be noted based on converting thex-secondary
value from snake_case to PascalCase. Name clashes are avoided by pre-pendingAutogen
as many times as required. #189Change the association table to no longer be constructed as a table and instead to be constructed as another model. #189
Refactor column factory to use the schemas artifacts #196
Refactor model factory to use the schemas artifacts #196
Fixed¶
Fix bug where the association table defined for
many-to-many
relationships did not make the foreign key columns referencing the two sides of the relationship primary keys. This may require a database migration if alembic was used to generate the database schema. #189Fix bug where some properties were incorrectly picked from a reference even though they existed locally (only impacts relationship properties where, for example,
x-secondary
was defined both on the relationship property inallOf
and on the referenced model). #189
v1.6.0 - 2020-10-10¶
v1.5.4 - 2020-08-30¶
Changed¶
Move
description
to be a top level property artifact for every property.
v1.5.2 - 2020-08-29¶
Changed¶
Expose function that collects artifacts for the models.
Expose function that collects artifacts for the model properties.
v1.5.0 - 2020-08-22¶
Added¶
Add support for generic
format
forstring
that are treated like astring
without aformat
.Add interface to check un-managed models for the reason why they are not managed.
Changed¶
Change constructable check to no longer check the schema of
x-tablename
andx-inherits
.Change schema validation to process properties even if the model is not valid.
v1.4.2 - 2020-08-16¶
Fixed¶
Fix bug where iterating over constructable schemas did not handle some exceptions
Add black dependency back in
v1.4.0 - 2020-08-09¶
Added¶
Add schemas pre-processor that extracts the required back references.
Add foreign key pre-processor that extracts the required foreign keys.
Add schema validation pre-processor.
Add function that checks a specification.
1.3.0 - 2020-07-12¶
Added¶
Add support for generic JSON data for properties.
Add support for
writeOnly
.
Fixed¶
Fix bug where the name of the foreign key column was based on the table name and not the property name.
1.2.0 - 2020-06-08¶
Added¶
Add support for
__str__
and__repr__
for model instances.
Changed¶
Ring fence
black
dependency.
Removed¶
Remove several bugs from the generated models file and integrate with
sqlalchemy-stubs
.
1.1.1 - 2020-05-17¶
Added¶
Add support for
readOnly
.
Fixed¶
Fix bug where TypedDIct types for
binary
,date
anddate-time
string formats mapped to the incorrect python types.Fix bug where
to_dict
andto_str
returnednull
for values that are not required and not nullable.
1.1.0 - 2020-04-05¶
Added¶
Add section of documentation for each example.
Add support for keyword arguments for relationships used to define relationship arguments not specifically handled by an extension property.
Add support for kwargs at the model, column and foreign key level.
Add support for single and joined table inheritance.
1.0.0 - 2020-03-21¶
Added¶
Add support for remote references to a file at a URL.
Add support for default values.
Add check for whether the value of an extension property is null.
0.13.0 - 2020-02-16¶
Added¶
Add tests for examples.
Add
from_str
andto_str
to complementfrom_dict
andto_dict
for de-serializing and serializing from JSON.Add description from OpenAPI specification into the models file.
Changed¶
Ring fence SQLAlchemy dependency to a facade and integration tests.
Ring fence jsonschema dependency into a facade.
0.12.1 - 2020-01-12¶
Fixed¶
Fix bug where auto generating models file meant that multiple classes with the same name were registered with the base.
0.12.0 - 2020-01-04¶
Added¶
Add checking whether the column is automatically generated to determining the type of a column.
Add support for
nullable
for object references.Add type hints for
\_\_init\_\_
andfrom_dict
.Add example for alembic interoperability.
Changed¶
Refactor object reference handling to be easier to understand.
Removed¶
Remove typing_extensions dependency for Python version 3.8 and later.
Fixed¶
Fix bug where format and maxLength was not considered for the foreign key constructed for an object reference.
0.11.0 - 2019-12-29¶
Added¶
Add support for
password
Add support for
binary
Add support for
byte
Add support for
date
Add optional parameter that can be used to generate a models file for IDE auto complete and type hinting
Add
from_dict
andto_dict
to the type models fileAdd SQLAlchemy information to models file
Add back references to models file
Changed¶
Move SQLAlchemy relationship construction behind facade
Move schema calculations into separate files
Refactor handling array references to reduce scope of individual tests and make them easier to understand
0.10.1 - 2019-12-15¶
Added¶
Add support for DateTime.
Changed¶
Refactor column handler to first check the schema, then gather the required artifacts for column construction and then construct the column.
0.10.0 - 2019-11-23 [Beta release]¶
Added¶
Add check for whether foreign key for relationship is already constructed before automatically constructing it.
Add support for returning parent properties in the child
to_dict
call usingreadOnly
properties.Add support for many to many relationships.
0.9.0 - 2019-11-10¶
Added¶
Add
from_dict
andto_dict
functions to all models that are used to construct a model from a dictionary and to convert a model instance to a dictionary, respectively.Add
x-foreign-key-column
extension property to define a custom foreign key constraint for many to one relationships.Add
x-composite-unique
extension property at the object level to construct unique constraints with multiple columns.Add
x-composite-index
extension property at the object level to construct indexes with multiple columns.Add support for one to one relationships.
Add support for one to many relationships.
Fixed¶
Fix bug where
allOf
merging would only return the properties of the last object instead of merging the properties.
0.8.0 - 2019-11-03¶
Added¶
Add less verbose initialisation with
init_yaml
andinit_json
.
Changed¶
Update name from OpenAPI-SQLAlchemy to OpenAlchemy
Removed¶
Remove need for separate models file by exposing
Base
and constructed models atopen_alchemy.models
.
0.7.0 - 2019-10-27¶
Added¶
Add support for Python 3.6.
Add connexion example application.
Add schema checking for extension properties.
Fixed¶
Fixed bug where referencing a schema which uses allOf in many to one relationships does not merge the allOf statement.
Fixed bug where a type hint that is not always exported from SQLAlchemy may cause an no member error.
0.6.3 - 2019-10-19¶
Added¶
Add support for backref for many to one relationships.
Add integration tests for major features.
Removed¶
Refactor to remove reference resolving decorator.
0.6.1 - 2019-10-19¶
Changed¶
Update name from openapi-SQLAlchemy to OpenAPI-SQLAlchemy. All urls are expected to keep working.
0.5.0 - 2019-09-29¶
Added¶
Add support for
$ref
for models.
Changed¶
Refactor column factory to use fewer decorators.
Change exceptions to include the schema name.