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.
v2.5.0 - 2021-05-23
- Add support for
int
values fornumber
types.
v2.4.2 - 2021-04-04
- Add support for SQLAlchemy 1.4.
- Add support for grouping models into schemas. #294
v2.3.0 - 2021-03-07
- Add support for OpenAPI 3.1. #276
v2.2.0 - 2021-01-23
- Removed unnecessary imports in
__init__.py
files. #255
- Caching validation results to speed up startup. #251
v2.1.0 - 2020-12-20
- Add support for namespaced
x-open-alchemy-
prefix on top of the shorterx-
prefix for extension properties. #236
v2.0.2 - 2020-12-19
- Changed from
setup.py
to poetry
v2.0.1 - 2020-12-08
- 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
- Add check enforcing unique
x-tablename
values. #189 - Add check enforcing unique
x-secondary
values. #189 - Add 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. #201 - Add a CLI sub command to regenerate models. #202
- Add support for database default values using
x-server-default
. #196
- 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. #189 - Change 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
- 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. #189 - Fix 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
- Remove
define_all
parameter forinit_model_factory
,init_json
andinit_yaml
. OpenAlchemy now behaves as thoughdefine_all
is set toTrue
. This means that a pure model reference (a schema with only the$ref
key) can no longer be used to change the name of a model. #189
v1.6.0 - 2020-10-10
- Add
build_json
andbuild_yaml
interfaces which can be used to produce a package with the models. #190 - Add support for building sdist or wheel distributable archive.
- Refactor the models file generation to use the artifacts from the schemas.
- Changed output of build_json and build_yaml to be contained within a project directory.
- Drop support for Python 3.6 and add support for Python 3.9. #198
v1.5.4 - 2020-08-30
- Move
description
to be a top level property artifact for every property.
- Correct
format
key to no longer have a trailing_
for artifacts.
v1.5.2 - 2020-08-29
- Expose function that collects artifacts for the models.
- Expose function that collects artifacts for the model properties.
v1.5.1 - 2020-08-23
- Add support for arbitrary mix in classes.
v1.5.0 - 2020-08-22
- 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.
- 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.3 - 2020-08-16
- Remove dependency on black
v1.4.2 - 2020-08-16
- Fix bug where iterating over constructable schemas did not handle some exceptions
- Add black dependency back in
v1.4.1 - 2020-08-09
- Remove black dependency
v1.4.0 - 2020-08-09
- 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
- Add support for generic JSON data for properties.
- Add support for
writeOnly
.
- 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
- Add support for
__str__
and__repr__
for model instances.
- Ring fence
black
dependency.
- Remove several bugs from the generated models file and integrate with
sqlalchemy-stubs
.
1.1.1 - 2020-05-17
- Add support for
readOnly
.
- 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
- 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
- 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.14.0 - 2020-02-21
- Add support for remote references to another file on the file system.
0.13.0 - 2020-02-16
- 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.
- Ring fence SQLAlchemy dependency to a facade and integration tests.
- Ring fence jsonschema dependency into a facade.
0.12.1 - 2020-01-12
- 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
- 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.
- Refactor object reference handling to be easier to understand.
- Remove typing_extensions dependency for Python version 3.8 and later.
- Fix bug where format and maxLength was not considered for the foreign key constructed for an object reference.
0.11.0 - 2019-12-29
- 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 file - Add SQLAlchemy information to models file
- Add back references to models file
- 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.4 - 2019-12-18
- Fix bug where some static files where not included in the distribution.
0.10.1 - 2019-12-15
- Add support for DateTime.
- 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]
- 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.1 - 2019-11-11
- Fix bug where some static files where not included in the distribution.
0.9.0 - 2019-11-10
- 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.
- 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
- Add less verbose initialisation with
init_yaml
andinit_json
.
- Update name from OpenAPI-SQLAlchemy to OpenAlchemy
- Remove need for separate models file by exposing
Base
and constructed models atopen_alchemy.models
.
0.7.0 - 2019-10-27
- Add support for Python 3.6.
- Add connexion example application.
- Add schema checking for extension properties.
- 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
- Add support for backref for many to one relationships.
- Add integration tests for major features.
- Refactor to remove reference resolving decorator.
0.6.2 - 2019-10-19
- Add support for python 3.8.
0.6.1 - 2019-10-19
- Update name from openapi-SQLAlchemy to OpenAPI-SQLAlchemy. All urls are expected to keep working.
0.6.0 - 2019-10-6
- Add support for
allOf
for models.
0.5.0 - 2019-09-29
- Add support for
$ref
for models.
- Refactor column factory to use fewer decorators.
- Change exceptions to include the schema name.
0.4.0 - 2019-09-21
- Add support for
allOf
for columns.
0.3.0 - 2019-09-08
- Add support for
autoincrement
. - Add support for
$ref
for columns referencing other table objects. - Add documentation
0.2.0 - 2019-08-25
- Add support for
$ref
for columns.
0.1.1 - 2019-08-18
- Move typing-extensions development to package dependency.
0.1.0 - 2019-08-18
- Initial release
- Add support for
integer
columns. - Add support for
boolean
columns. - Add support for
number
columns. - Add support for
string
columns.