Xero-OpenAPI icon indicating copy to clipboard operation
Xero-OpenAPI copied to clipboard

Invoice Types do not seem accurate.

Open SerKnight opened this issue 4 years ago • 1 comments

For this specific S/O question, our spec says there can be 8 enums, but old docs just had the two.. (which looks correct) I tested trying to create with a few of those 6/8, got:

"Message": "Invoice not of valid type for creation"

Queried all demo company Invoice types, getting only:

"Type": "ACCREC",
"Type": "ACCPAY",

https://stackoverflow.com/questions/67986653/xero-invoice-types

Expected Behavior

  • Expect the OAS to only have the Invoice types declared that are possible and expected
  • Expect the core Xero docs (built from this spec) to accurately show descriptions for each invoice type.

Current Behavior

  • types have no descriptions
  • types don't seem accurate for Invoices

Possible Solution

Lots of talk in the OAS work about this. Need to investigate.

https://github.com/json-schema-org/json-schema-vocabularies/issues/47

  • Attaching Enum descriptions all throughout the spec.

SerKnight avatar Jun 15 '21 18:06 SerKnight

Another example is that the descriptions of the UK payroll enums were never represented in the spec.

Once we surface descriptions clearly in the new docs, this solve should be as simply as porting to the OAS the legacy desc's.

Screen Shot 2021-06-15 at 11 56 21 AM Screen Shot 2021-06-15 at 11 56 30 AM

SerKnight avatar Jun 15 '21 18:06 SerKnight