GRESB / api-docs

http://gresb.github.io/api-docs/
4 stars 0 forks source link

No Validation Message when asset_gav is 0 besides able to report per asset. #92

Closed naincygoyal closed 2 years ago

naincygoyal commented 2 years ago

Describe the bug Getting no validation message when giving 0 value for GAV besides according to report it needs to be report annual not per asset but currently I can give under Asset. Although it seems asset_gav does not have any impact on response.

To Reproduce Steps to reproduce the behaviour:

  1. Use POST Request in Postman to create an asset for entity 16286 - {{baseUrl}}/api/v1/entities/:entity_id/assets/

Expected behaviour Response should throw an error on entering invalid value either 0 or string.

Screenshots

image

Additional context I believe gav we can report per asset and api docs needs to be updated.

image

joeyhorst commented 2 years ago

asset_gav is provided per asset as can be seen in:

the asset spreadsheet ![image](https://user-images.githubusercontent.com/29230216/156724512-db666245-505a-4462-a425-2fedd319ed3f.png)
and the Asset Portal UI ![image](https://user-images.githubusercontent.com/29230216/156724692-3010ed0a-1825-45eb-b161-a9b6b91de61f.png)

Not sure what you mean by:

according to report it needs to be reported annual not per asset


Response should throw an error on entering invalid value either 0 or string.

  1. it should return a validation if the value is 0
error in the UI ![image](https://user-images.githubusercontent.com/29230216/156725060-2b536ea4-897d-440c-a198-b5a0a37f5497.png)
  1. in the UI it doesn't allow the user to enter "abc" as it only alllows numerical values. As it is an optional field the API will simple disregard the string and not throw an error. We should check 1. but the second issue is not a problem.
naincygoyal commented 2 years ago

I am closing this issue as its working fine.