pgj opened a new pull request, #4751:
URL: https://github.com/apache/couchdb/pull/4751

   The `fields` attribute on `_explain` might have the string value 
`"all_fields"` when the respective query parameter (`fields`) is not set by the 
user.  This is to express that no projection of fields would happen on the 
returned documents.
   
   The current behavior contradicts with the current contract, because by 
documentation, `fields` is an array of strings instead to provide information 
on the projected fields.  The discrepancy here makes it hard to formalize this 
in OpenAPI which leads to problems in the development of SDKs, among others.
   
   Change `_explain` to return `[]` for `fields` when it was not set through 
the query parameters. This is thought to be semantically equivalent to 
`"all_fields"` therefore this would not cause problems while preserving the 
promised type.
   
   Thanks @ricellis for reporting this problem!
   
   ## Testing recommendations
   
   ```
   make eunit apps=mango
   ```
   
   Users who based their solution on utilizing the `"all_fields"` response 
explicitly might need to change it to use `[]` instead. Otherwise they will not 
affected by the change.
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [x] Documentation changes were made in the `src/docs` folder
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to