Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BRAVA Error on /variables endpoint #34

Closed
RichardBruskiewich opened this issue May 1, 2019 · 1 comment
Closed

Fix BRAVA Error on /variables endpoint #34

RichardBruskiewich opened this issue May 1, 2019 · 1 comment

Comments

@RichardBruskiewich
Copy link

RichardBruskiewich commented May 1, 2019

BRAVA test error: Response structure doesn't match schema:

Test: Json matches schema: /schemas/v1.2/variables.json

Error: validation - type
In element: /result/data/0/contextOfUse
Expected: array, null
Found: string
Message: instance type (string) does not match any allowed primitive type (allowed: ["array","null"])

AND

Error: validation - minItems
In element: /result/data/2/scale/validValues/categories
Minimum items: 1
Message: array is too short: must have at least 1 elements but instance has 0 elements

NOTE: This latter error may be due to the absence of data in the test database used.

Generally, the tripal/brapi module doesn't seem to implement the full set of fields covered by the variable specification. The above error simply picks up on a field which has an expected type of 'array' (other empty or missing fields are just ignored).

@RichardBruskiewich RichardBruskiewich changed the title Fix BRAVA Error on /variables/datatype endpoint Fix BRAVA Error on /variables/datatypes endpoint May 1, 2019
@RichardBruskiewich RichardBruskiewich changed the title Fix BRAVA Error on /variables/datatypes endpoint Fix BRAVA Error on /variables endpoint May 1, 2019
@guignonv
Copy link
Member

guignonv commented Jun 3, 2019

This issue is not related to the Drupal module as the call tested by Brava on MGIS was proxied to http://www.cropontology.org/brapi/v1.

@guignonv guignonv closed this as completed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants