README.md
Package detail
@odata2ts/odata2ts
Flexible generator to produce various TypeScript artefacts (from simple model interfaces to complete odata clients) from OData metadata files
readme
changelog
Change Log
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.39.1 (2024-12-18)
Bug Fixes
0.39.0 (2024-10-28)
Features
- generator: add cast operations to base type services (#327) (df52284)
- generator: conversion of subtype by control info (#331) (a8a8a50)
- generator: qobjects with casted subtype props (#328) (88eb9bd)
- service: subtype services (#332) (6918735)
- service: support no url encoding (#326) (304bc62)
BREAKING CHANGES
- service: dedicated options parameter for all services
0.38.1 (2024-09-19)
Bug Fixes
generator: api usage analysis must respect alias (#317) (5877161)
generator: set peer dependency of TS to >= 4.7 (949d874)
0.38.0 (2024-09-11)
Bug Fixes
generator: add rimraf as dependency (9f08ccd)
generator: use typeof when using enums as types (baf784f)
Features
compile src & test folders as sanity check (12607f0)
0.37.0 (2024-08-25)
Code Refactoring
Features
- use kebap-case for folder names (unbundledFileGeneration) (9f26e1f)
BREAKING CHANGES
as there is no generated index file all file paths must be fixed.
ESM tends to break stuff
0.36.3 (2024-08-12)
Bug Fixes
- generator: v4 types like Edm.Date, Edm.TimeOfDay and Emd.Duration are not recognized (#295) (3b63969)
0.36.2 (2024-08-01)
Bug Fixes
0.36.1 (2024-07-31)
Bug Fixes
0.36.0 (2024-07-31)
Features
generator: add ts-nocheck to each generated file by default (#284) (655a3ab)
generator: generate services based on API reference chain (#275) (8fd415b)
generator: support function overloads for different parameter sets (#282) (0b53271)
model files always get type checked (no @ts-nocheck) (#288) (43ca58b)
BREAKING CHANGES
- generator: generated code won't be type checked anymore. Use
debug: true
to get type checking back.
0.35.0 (2024-05-16)
Bug Fixes
Features
0.34.0 (2024-05-03)
Bug Fixes
Features
0.33.2 (2024-04-22)
Bug Fixes
generator: add special logic for bound operation name clas resolution (gets prefixed by bound entity) (#259) (2a0f9ff)
generator: await ensureDir calls (99c679d)
generator: in unbundled mode unbound action models should go into main files (#264) (5dd52ec)
generator: too many imports for services with entity nav props (1cae569)
generator: write main service file only once (74e39a0)
generator: wrong namespace prefix calculated (2ad5a56)
0.33.1 (2024-03-23)
Note: Version bump only for package @odata2ts/odata2ts
0.33.0 (2024-03-17)
Bug Fixes
Features
generator: auto detected service names are run through pascalCase to ensure valid class names (#250) (04fcf49)
generator: no collection services for entity types without keys (#248) (56540b2)
0.32.0 (2024-03-10)
Bug Fixes
- fully qualified name for EntitySet, Singleton & FunctionImport by EntityContainer name instead of namespace (#245) (6047122)
Code Refactoring
Features
BREAKING CHANGES
- Config options
entitiesByName
andoperationsByName
have been dropped. You must usebyTypeAndName
instead and provide the new type property for each configuration.
Renaming now supports EntityType, ComplexType, EnumType and any operation type (FunctionImport, Function, Action).
0.31.1 (2023-11-15)
Bug Fixes
0.31.0 (2023-10-29)
Bug Fixes
Features
generator: allow for renaming of operations (#231) (8bff901)
generator: entity config supporting namespaces (#226) (ff52dc0)
BREAKING CHANGES
- generator: regular expressions must now match against the fully qualified name (e.g. "Trippin.Person") instead of the simple name (e.g. "Person").
When matching exactly by name, you can use the simple name as before or the fully qualified name (alias is also supported).
0.30.0 (2023-10-05)
Features
0.29.1 (2023-09-13)
Note: Version bump only for package @odata2ts/odata2ts
0.29.0 (2023-08-08)
Bug Fixes
- odata2ts: downgrade prettier plugin xml to 2.2.0 (36525f9)
Features
BREAKING CHANGES
removed the public method "getQObject"
refactor(odata2ts): use __base properties of inherited services
feat(service): introduce PrimitiveTypeService
feat(odata2ts): allow to generate PrimitiveTypeServices via option enablePrimitivePropertyServices
feat(example): integration tests for primitive type services
0.28.0 (2023-07-31)
Features
0.27.0 (2023-07-20)
Features
0.26.1 (2023-07-13)
Bug Fixes
0.26.0 (2023-07-13)
Bug Fixes
Features
0.25.1 (2023-07-10)
Bug Fixes
0.25.0 (2023-07-10)
Bug Fixes
Features
0.24.0 (2023-06-14)
Features
0.23.1 (2023-06-10)
Note: Version bump only for package @odata2ts/odata2ts
0.23.0 (2023-06-03)
Features
- force new minor for new http-client-api (5628666)
0.22.0 (2023-04-27)
Code Refactoring
- odata2ts: dispense with resolver & directly implement related services as getter (9b49501)
BREAKING CHANGES
- odata2ts: Changed defaults for properties representing related services: no prefix anymore, just the name of the property as function (previously, prefix
navTo
).
Removed get
method of EntitySetServices: use property directly instead.
Removed the following naming options regarding generated services: serviceResolverFunction
, publicProps
0.21.0 (2023-04-20)
Features
0.20.3 (2023-04-18)
Bug Fixes
odata2ts: add empty array as type for empty params (#154) (fbdd000)
prevent idModel and qIdFunction from baseclass to be overwritten in digester which breaks multiple inheritance (#150) (e17038e)
Reorder models and qobjects by inheritance (base types first) (#151) (7d456fe)
0.20.2 (2023-04-13)
Note: Version bump only for package @odata2ts/odata2ts
0.20.1 (2023-04-08)
Note: Version bump only for package @odata2ts/odata2ts
0.20.0 (2023-04-04)
Features
0.19.2 (2023-03-23)
Bug Fixes
odata2ts: entity resolver uses wrong Q-Id function when id is inherited (e05f4eb)
odata2ts: semantically wrong unit test (541a687)
0.19.1 (2023-02-24)
Bug Fixes
- odata2ts: ts-node as proper dep instead of peer-dep (2050524)
0.19.0 (2023-02-14)
Features
0.18.6 (2023-02-13)
Bug Fixes
- build (2a54611)
0.18.5 (2023-02-13)
Bug Fixes
- build (2a54611)
0.18.4 (2023-02-13)
Note: Version bump only for package @odata2ts/odata2ts
0.18.3 (2023-02-03)
Bug Fixes
0.18.2 (2023-01-11)
Bug Fixes
0.18.1 (2023-01-10)
Bug Fixes
- odata2ts: no model param and no q operation generation for collection bound operations (#110) (71769c2)
0.18.0 (2023-01-07)
Bug Fixes
- odata2ts: configurable naming of main service (c2bdeeb)
Code Refactoring
Features
odata-service: introduce entity service resolver (#100) (66dd853)
odata2ts: add snakeCase as new renaming strategy (#101) (09f9bfb)
BREAKING CHANGES
odata2ts: option
service.fileNames
was removed in favour ofservice.main
, so that the main service can be configured individually; the underlying bug was that file names SHOULD NOT be configurable for servicesodata2ts: changed default: uses "navToX" instead of "getXSrv" to navigate to other services; old behaviour can be restored via naming configuration prefix: "get", suffix: "Srv"
rename module odata-uri-builder to odata-query-builder; API completely refactored by renaming all models, classes, functions, props from "uri" to "query"
rename odata2model to odata2ts; affects import in
odata2ts.config
, affects scripts inpackage.json
or any scripts which use to callodata2model
command directly
0.17.0 (2023-01-05)
Bug Fixes
Code Refactoring
Features
BREAKING CHANGES
- odata2ts: new default: allowRenaming=false; removed prop
naming.disableNamingStrategy
0.16.1 (2022-12-21)
Bug Fixes
odata2ts: import deferred content from core (V2 only) (66bee43)
only import QEntityPath when needed (81a4e77)
0.16.0 (2022-12-18)
Bug Fixes
odata2model: don't generate useless constructors (f495604)
odata2ts: disable entities by name from config interfaces => not implemented yet (96fefbe)
odata2ts: disable own section about entitiesByName (78d9c6e)
Features
odata2model: extensive configuration model via config file (#67) (a42aee4)
odata2ts: adapt method generation for services (486a85c)
odata2ts: adapt query object generation to OperationReturnTypes (734e2bd)
odata2ts: apply name mapping in all places (dd5a6fd)
odata2ts: property configuration with name mapping and managed flag (#78) (797566c)
0.15.0 (2022-12-18)
Bug Fixes
odata2model: don't generate useless constructors (f495604)
odata2ts: disable entities by name from config interfaces => not implemented yet (96fefbe)
odata2ts: disable own section about entitiesByName (78d9c6e)
Features
odata2model: extensive configuration model via config file (#67) (a42aee4)
odata2ts: adapt method generation for services (486a85c)
odata2ts: adapt query object generation to OperationReturnTypes (734e2bd)
odata2ts: apply name mapping in all places (dd5a6fd)
odata2ts: property configuration with name mapping and managed flag (#78) (797566c)
0.14.2 (2022-09-09)
Bug Fixes
- IdFunction never gets v2Mode flag (f36d173)
0.14.1 (2022-09-08)
Bug Fixes
0.14.0 (2022-09-08)
Code Refactoring
Features
odata-service: allow to pass custom headers per request (#58) (d783e51)
odata2model: add typescript support for odata2ts.config (70a01e5)
odata2model: support V2 functions with HTTP method POST (#61) (c9213fa)
BREAKING CHANGES
- UrlHelper including compile and parse methods have been removed; interfaces for EntityKeyProp, EntityKeySpec, InlineUrlProp, and InlineUrlProps have been removed; parsing of passed parameters is more strict.
Introducing static functions on QPath objects to format and parse url conform values.
Introducing QParams, QFunction and QAction to bundle logic around operations including the id function (url path generation).
Generate models for IdType of entity & parameter models for functions / actions in general
Generate Q-objects for EntityIdFunctions, and functions & actions in general
0.13.1 (2022-08-25)
Bug Fixes
0.13.0 (2022-08-11)
Code Refactoring
Features
BREAKING CHANGES
uri-builder: It was possible to select nested props by using q-props (V2 only); this syntax has been removed and will be replaced by making use of the current V4 syntax: you first expand the property (method "expanding") and then select (or expand) on the expanded entity.
uri-builder: ODataUriBuilder was removed from export, it might have served as base class but was of no other use.
0.12.1 (2022-08-01)
Bug Fixes
0.12.0 (2022-08-01)
Bug Fixes
Code Refactoring
Features
createKey and parseKey for EntitySetService & correct V2 type prefixing (#39) (edd05bb)
typing improvements & editable model versions (#27) (df290df)
BREAKING CHANGES
use proper getMethods for services "getXxxSrv()" instead of get accessors "xxx"
consistent camel or pascal casing for services, models and props
fix: always empty output dir before generating
model has become a true query response model.
Properties which are nullable now allow null values instead of undefined;
complex types are never undefined, but can be nullable;
collections are never nullable.
V2 only: added deferred content typings for entity and entity collection properties.
feat: generate EditableModels and use in service for create, update, and patch
different signatures for all actions
test: proper test for ModelImportContainer & dataModel.getEditableModelName
test: proper test for DataModel
refactor(odata2model): don't always combine handling of complex and entity types
0.11.2 (2022-07-20)
Bug Fixes
0.11.1 (2022-07-11)
Note: Version bump only for package @odata2ts/odata2model
0.11.0 (2022-07-06)
Features
0.10.1 (2022-06-30)
Bug Fixes
- add prebulish script to guarantee building before publishing (b6986db)
0.10.0 (2022-06-30)
Features
BREAKING CHANGES
- new file names
0.9.0 (2022-05-21)
Bug Fixes
V2 function params as query params (07a1f29)
odata2model: fix tests (efd12bc)
odata2model:DataModel: Duplicate keys when extending multiple times (157aa13)
odata2model:test: name northwind-v4 fixture correctly (39e77f4)
test: collect code coverage from src folders, thus exhibiting untested code (3acef8b)
test: fix data-model tests (b8abb8a)
test: make coverage test run again (f2d360b)
on windows ts-node needs cwd-mode flag (4f3c0f5)
Features
integration tests for V2 (ODataV2 sample service) (98bf0b8)
odata2model: FixtureComparator ignores @ts-ignore (b483ed5)
odata2model: move v4 tests & adapt expectations of fixtures (2f84127)
odata2model: V2 service generation support (2b17a01)
odata2model:Cli: load config from file via cosmiconfig (a490778)
odata2model:Cli: log file paths relative to working dir of process (fc1ce86)
test: add run-cli integration test (45a2da1)
test: app test (ad9d3f2)
test: Builder for generating Edmx schemas in JSON (227279a)
test: FixtureComparator (38b03bf)
test: ProjectManager test without testing formatting including some refactorings (8f666f3)
test: same tests for model & qobject generation (a4d882d)
test: ServiceGenerator tests & fixes (6a2c242)
test: test for ProjectManager (first draft) (f705b0b)
test: testing Model generation (6d7c530)
test: Tests for DataModel and EDMX digestion (5740292)
BREAKING CHANGES
no EntityFactory anymore, no nominalized types in interfaces anymore, etc.
refactor(qObjects): getEntity with prefix option; by default without prefix
fix(qObjects): better QPath modelling
refactor(uri-builder): only use QueryObjects for typing & remove QEntityModel stuff
refactor(odata2model): generate new QObject classes
refactor(service): services now require Model as well as QClass
refactor(odata2model): generate services with new QObject classes
fix(odata2model): fix integration tests
fix: make int-tests for coverage task work again
fix: skip run-cli tests (don't work on github)
0.8.2 (2021-10-12)
Note: Version bump only for package @odata2ts/odata2model
0.8.1 (2021-09-17)
Bug Fixes
- odata-service: revert exposure of Unnominalized (6ce4ea7)
0.8.0 (2021-09-17)
Bug Fixes
- fix test (2144cca)
Code Refactoring
- odata-service: use odata names as param names (73b130a)
Features
- odata2model: unnominalize response values of actions / functions (4f284fa)
BREAKING CHANGES
- odata-service: param names of complex keys have changed
0.7.1 (2021-09-16)
Note: Version bump only for package @odata2ts/odata2model
0.7.0 (2021-08-31)
Bug Fixes
odata2model: correct typing for returned collection types (3943f08)
odata2model: fix tests (96556cd)
service: don't use nominal types for input; use string instead (788dc5c)
Features
- map ID to id (a0652fa)
0.6.0 (2021-08-17)
Features
- odata2model: add emitMode to allow js and/or d.ts generation (88e69ca)
0.5.0 (2021-08-16)
Bug Fixes
- odata2model: add import for parameter types (03f25f4)
Features
odata2model: add bound func/actions & add primitive collections (c18daac)
odata2model: check for missing type & throw error (39cdd55)
0.4.0 (2021-08-16)
Bug Fixes
more service tests, fix prop names vs odata names (489b690)
odata2model: fix path for main entity sets (c8fba2a)
odata2model: wrong imort for service from root (1de6eef)
Features
odata2model: add CollectionService, rework main service file (026e999)
odata2model: add jest & add dev and peer deps (4076d1f)
odata2model: add keySpec to EntitySets & implement get() (500e576)
odata2model: dataModel with fileNames, qNames, models with baseProps & baseKeys & qObjects(collections only) (42d1630)
odata2model: generate ModelServices & EntitySetService (347bbbb)
odata2model: introduce ImportContainer to organize imports (6fab097)
odata2model: parse functions & actions & entityContainer stuff into DataModel (7fb9bb8)
odata2model: realize new QEntityCollectionPath prop (5eaf31a)
odata2model: service gen for unbound funcs with params (d7516da)
odata2model: service generation for unbound parameterless functions (2441aad)
odata2model: setup ServiceGenerator (8fbfffc)
odata2model: use dataModel.fileNames for app (9487893)
service: add singletons (5695389)
service: init navProps via accessor instead of getter methods (bb93f30)
0.3.0 (2021-08-10)
Bug Fixes
- odata2model: give first schema priority (8fed26f)
Code Refactoring
- QEntityModel without key spec (913cd11)
Features
odata2model: add type knowledge for function, action, complex & singleton (56f7e5f)
odata2model: generate Enums & CollectionPaths & respect baseClasses for QObjects (e9dfce5)
odata2model: model gen with support for complex types, enum types (f2d5b3b)
odata2model: support BaseType for entity & complex types (20c5ab2)
odata2model: support complex types & primitive collections (6481920)
add sample requests covering trippin features (2cc900f)
BREAKING CHANGES
odata2model: qObjects are generated differently
[query-objects]: QEntityModel without key spec & __collectionPath; [UrlBuilder]: path must be provided explicitly now for any entity set
0.2.1 (2021-07-23)
Bug Fixes
- odata2model: respect suffix & prefix in relationships (cc59d9f)
0.2.0 (2021-07-23)
Features
- odata2model: add options for suffix & prefix (d5d9a81)
0.1.4 (2021-07-08)
Note: Version bump only for package @odata2ts/odata2model
0.1.3 (2021-07-01)
Note: Version bump only for package @odata2ts/odata2model
0.1.2 (2021-07-01)
Note: Version bump only for package @odata2ts/odata2model
0.1.1 (2021-07-01)
Note: Version bump only for package @odata2ts/odata2model