Mangosoft-team / Demo

0 stars 1 forks source link

Security mapping #35

Closed sashkoif closed 5 years ago

sashkoif commented 5 years ago

I get this

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "type" 
(class de.varengold.cdl.core.model.security.Security), not marked as ignorable (6 known
 properties: "currencyIso", "emittendId", "exchangeTradedYN", "symbol2", "name", "isin"])
 at [Source: (String)"{"isin":"XS0802005289","name":"Republic of Bulgaria 4,25 
07/09/17","emittendId":9494,"currencyIso":"EUR","exchangeTradedYN":"Y","symbol2":null,"type":2
,"emission":"2012-07-09","redemption":"2017-07-09"
,"interest":9,"nachrangYN":"N","coverage":0,"guaranteed":0,"perpetualYN":"N"}"; line: 1, column:
 152] (through reference chain: de.varengold.cdl.core.model.security.Security["type"])
CT-VG commented 5 years ago

When do you get this message? Which endpoint did you call with what parameters/body?

sashkoif commented 5 years ago

GET "securities/"+isin I need Security for SecurityColleteral on SecurityAgreement slide

CT-VG commented 5 years ago

should be fixed

sashkoif commented 5 years ago

Did you add something that I should pay attention to? Because I get the same

CT-VG commented 5 years ago

Okay. This should be resolved. Please tell me which ISIN you are requesting.

sashkoif commented 5 years ago

"securityIsin": "XS0802005289"

CT-VG commented 5 years ago

I can only reproduce the error in your project. When doing a standalone test with the given backend I don't get the error. Please double check that you have the latest versions from GIT

sashkoif commented 5 years ago

I added the last core model img2 After that I still get the same error, I checked Security class img1 and controller responce img3 Seems like Security class isn't fully implemented

CT-VG commented 5 years ago

What I can see from you screenshots: You are expecting a de.varengold.cdl.core.model.security.Security object and you get a de.varengold.cdl.core.model.security.bond.Bond object which extends the Security-class. This should work.

I added the json type info to the Security class (same as creditfacility -> term facility) hopefully this will solve your issues.

Now the result looks like this:

{
    "@class": "de.varengold.cdl.core.model.security.bond.Bond",
    "isin": "XS0802005289",
    "name": "Republic of Bulgaria 4,25 07/09/17",
    "emittendId": 9494,
    "currencyIso": "EUR",
    "exchangeTradedYN": "Y",
    "symbol2": null,
    "type": 2,
    "emission": "2012-07-09",
    "redemption": "2017-07-09",
    "interest": 9,
    "nachrangYN": "N",
    "coverage": 0,
    "guaranteed": 0,
    "perpetualYN": "N"
}