Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OData V2 date and time #100

Merged
merged 8 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
# Changelog

## 0.10.0 2024-03-01
## 0.10.1 - 2024-07-04

### Fixed

- `xml2json`: ignore V2 annotation `display-format="Date"` and preserve original type

## 0.10.0 - 2024-03-01

### Added

- `xml2json`: support `<![CDATA[...]]>` in "free-text" elements, for example `<edm:String>`

## 0.9.2 2024-01-24
## 0.9.2 - 2024-01-24

### Added

- `xml2json`: detect name collisions of schemas, schema children, type children, and entity container children

## 0.9.0 2024-01-24
## 0.9.0 - 2024-01-24

### Added

- `xml2json`: option `messages` to collect all error messages in non-strict mode

## 0.8.3 2023-08-16
## 0.8.3 - 2023-08-16

### Fixed

- `xml2json`: OData V2 EntitySet element may contain Documentation element

## 0.8.2 2023-06-15
## 0.8.2 - 2023-06-15

### Fixed

- `xml2json`: Annotation targets for overloads with collection-typed parameters are now correctly normalized

## 0.8.1 2023-03-06
## 0.8.1 - 2023-03-06

### Added

- `xml2json`: OData V2: accept `Documentation` element nested in `FunctionImport` and `Parameter` elements

## 0.8.0 2023-02-27
## 0.8.0 - 2023-02-27

### Added

- `xml2json`: accept more [SAP Annotations for OData Version 2.0](https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md)

## 0.7.0 2022-10-20
## 0.7.0 - 2022-10-20

### Added

- `xml2json`: accept some [SAP Annotations for OData Version 2.0](https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md) and turn them into [Capabilities](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Capabilities.V1.md)

## 0.6.0 2022-08-31
## 0.6.0 - 2022-08-31

### Changed

Expand All @@ -57,38 +63,38 @@
- `annotations` (Boolean, default `false`): include XML annotation attributes in JSON output
- `strict` (Boolean, default `false`): strict validation of XML source (some validations cannot be turned off)

## 0.5.1 2022-08-30
## 0.5.1 - 2022-08-30

### Changed

- `xml2json`: strip illegal whitespace from annotation targets in XML source
- `xml2json`: correctly process annotation targets for action/function overloads with collection-valued parameters

## 0.5.0 2022-08-11
## 0.5.0 - 2022-08-11

- `edm.xsd`: correct patterns for TSimpleIdentifier, TQualifiedName, and TTypeName

## 0.4.4 2022-03-29
## 0.4.4 - 2022-03-29

### Added

- `xml2json`: detect unexpected text content in source XML
- `xml2json`: improved checks for `ReturnType` element

## 0.4.3 2022-01-10
## 0.4.3 - 2022-01-10

### Added

- Allow V4 annotations as foreign markup in V2

## 0.4.2 2022-01-07
## 0.4.2 - 2022-01-07

### Added

- `Property` and `Term` with `Type="Collection(...)"` must specify `Nullable` in 4.01.
- `ReturnType Type="Collection(Edm.EntityType)"` must not specify `Nullable`.

## 0.4.1 2021-12-13
## 0.4.1 - 2021-12-13

### Added

Expand All @@ -98,7 +104,7 @@

- `csdl.schema.json`: patterns for SimpleIdentifier and QualifiedName

## 0.4.0 2021-12-06
## 0.4.0 - 2021-12-06

### Added

Expand All @@ -109,7 +115,7 @@
- missing required attributes
- unexpected local attributes

## 0.3.0 2021-09-24
## 0.3.0 - 2021-09-24

### Added

Expand Down
4 changes: 0 additions & 4 deletions lib/xml2json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2108,10 +2108,6 @@ module.exports.xml2json = function (
case "updatable":
updatable = attribute.value === "true";
break;
case "display-format":
if (attribute.value === "Date" && target.$Type === "Edm.DateTime")
target.$Type = "Edm.Date";
break;
case "validation-regexp":
target[`@${alias[VOCABULARIES.Validation.Namespace]}.Pattern`] =
attribute.value;
Expand Down
Loading