davidmoten / microsoft-dynamics-finance-client

Java client for Microsoft Dynamcis Finance and Operations API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All method names with "dimension" in name split by space character

MazZzDaI opened this issue · comments

Hello,

That's excellent utility! I'm so thankful!

But I found one issue with scaffolding: when proxy classes generated, each method when in its name "dimension" word appears are split into several words. Example:
public DimensionCombinationRequest dimension Customer(Long recordId) {...}

but actually expected concatenated with "dimension" method's name:
public DimensionCombinationRequest dimensionCustomer(Long recordId) {...}

Thanks. Can you show me your metadata please (I don't think the word dimension is important but rather that perhaps there are spaces in your metadata fields)?

My guess is your metadata is going against the OData v4 naming standard:

From https://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html#_Toc38466413:

The property’s name MUST be a simple identifier.

A simple identifier cannot have spaces: https://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html#sec_SimpleIdentifier.

Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits.

Anyway, without seeing your metadata I can only guess. Incidentally, if you don't care about the concerned properties then you can comment them out in the metadata and regenerate.

Thank you very much for your answer.
As you pointed me, I validated $metadata and found that it actually has spaces in places where spaces are not supposed to be.

The provided below RegEx solves my issue perfectly:
Search of (?<=(public) .*)dimension please note the space character in the end
Replace with dimension with no ending space