OpenAlchemy

Define SQLAlchemy models using the OpenAPI specification.

APACHE-2.0 License

Downloads
5K
Stars
48
Committers
9

Bot releases are visible (Hide)

OpenAlchemy - Release v2.5.0 Latest Release

Published by github-actions[bot] over 3 years ago

Added

  • Add support for int values for number types.
OpenAlchemy - Release v2.4.2

Published by github-actions[bot] over 3 years ago

Added

  • Add support for SQLAlchemy 1.4.
  • Add support for grouping models into schemas. [#294]
OpenAlchemy - v2.3.0

Published by jdkandersson over 3 years ago

Added

  • Add support for OpenAPI 3.1. [#276]
OpenAlchemy - v2.2.0

Published by github-actions[bot] over 3 years ago

Fixed

  • Removed unnecessary imports in __init__.py files. [#255]

Added

  • Caching validation results to speed up startup. [#251]
OpenAlchemy - v2.1.0

Published by jdkandersson almost 4 years ago

Added

  • Add support for namespaced x-open-alchemy- prefix on top of the shorter
    x- prefix for extension properties. [#236]
OpenAlchemy - v2.0.2

Published by github-actions[bot] almost 4 years ago

Changed

  • Changed from setup.py to poetry
OpenAlchemy - v2.0.1

Published by github-actions[bot] almost 4 years ago

Added

  • Add version, title and description (if defined) into the JSON OpenAPI
    specification stored with the package generated by the build module.
OpenAlchemy - v2.0.0

Published by github-actions[bot] almost 4 years ago

Added

  • 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]

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 the
    x-secondary value from snake_case to PascalCase. Name clashes are avoided
    by pre-pending Autogen 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]

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.
    [#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 in
    allOf and on the referenced model). [#189]

Removed

  • Remove define_all parameter for init_model_factory, init_json and
    init_yaml. OpenAlchemy now behaves as though define_all is set to
    True. 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]
OpenAlchemy - Models Distribution Package

Published by jdkandersson about 4 years ago

  • Refactor the models file generation to use the artifacts from the schemas.
  • Add build_json and build_yaml interfaces which can be used to produce a package with the models.
  • Changed output of build_json and build_yaml to be contained within a project directory.
  • Add support for building sdist or wheel distributable archive.
  • Drop support for Python 3.6 and add support for Python 3.9.
OpenAlchemy - v1.5.4 Correct Artifact Location

Published by jdkandersson about 4 years ago

  • Move description to be a top level property artifact for every property.
OpenAlchemy - v1.5.3 Correct Format Artifact Name

Published by jdkandersson about 4 years ago

  • Correct format key to no longer have a trailing _ for artifacts.
OpenAlchemy - v1.5.2 Get Artifacts

Published by jdkandersson about 4 years ago

  • Expose function that collects artifacts for the models.
  • Expose function that collects artifacts for the model properties.
OpenAlchemy - v1.5.1 Mixin Classes

Published by jdkandersson about 4 years ago

  • Add support for arbitrary mix in classes.
OpenAlchemy - v1.5.0 - Generic Format and Validation Improvements

Published by jdkandersson about 4 years ago

  • Add support for generic format for string that are treated like a string without a format.
  • Change constructable check to no longer check the schema of x-tablename and x-inherits.
  • Change schema validation to process properties even if the model is not valid.
  • Add interface to check un-managed models for the reason why they are not managed.
OpenAlchemy - v1.4.3 Remove Black

Published by jdkandersson about 4 years ago

  • Remove dependency on black
OpenAlchemy - v1.4.2 - Black Added Back & Bug Fix

Published by jdkandersson about 4 years ago

  • Fix bug where iterating over constructable schemas did not handle some exceptions
  • Add black dependency back in
OpenAlchemy - v1.4.1 Remove Black Dependency

Published by jdkandersson about 4 years ago

  • Remove black dependency
OpenAlchemy - v1.4.0 Schema Pre-Validation

Published by jdkandersson about 4 years ago

  • 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.
OpenAlchemy - v1.3.0 JSON and writeOnly

Published by jdkandersson over 4 years ago

  • 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.
Package Rankings
Top 7.88% on Pypi.org
Badges
Extracted from project README
Documentation Status Buy Me A Coffee
Related Projects