onepf / OpenAEP

Open Application Exchange Protocol (for stores)
3 stars 1 forks source link

How to handle missing data in response. #6

Open jesper-sjovall opened 10 years ago

jesper-sjovall commented 10 years ago

According to the specification for Open AEP https://github.com/onepf/OpenAEP/blob/master/specification/openaep_spec_1_0.md I think we must decide how to handle missing data in the response.

Take for example: https://www.distributorappstore.com/openaep/downloads How should distributorappstore fill the field for if the store do not have the requested data for fill the answer correctly. ( In example we missing device-model and name, last update, is update )

Way 1 to do this:

<?xml version="1.0" encoding="UTF-8"?>
<downloads version="1">
  <download>
    <package>com.softspb.geo_game</package>
    <datetime>2013-02-22T23:30:30Z</datetime>
    <version>1.0</version>
    <build>50</build>
    <last-updated></last-updated>
    <device-model></device-model>
    <device-name></device-name>
    <country>US</country>
    <is-update></is-update>
  </download>
</downloads>

Or way 2 to do this:

<?xml version="1.0" encoding="UTF-8"?>
<downloads version="1">
  <download>
    <package>com.softspb.geo_game</package>
    <datetime>2013-02-22T23:30:30Z</datetime>
    <version>1.0</version>
    <build>50</build>
    <country>US</country>
  </download>
</downloads>
oorlov commented 10 years ago

way 2 looks better. "no tags" means "no info"

jesper-sjovall commented 10 years ago

OK, We take way 2.