Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29276 META- Web service improvements for 2.2
  3. MDL-29459

Inconsistency between REST-XML and other servers: returned value validation process if different

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1
    • Fix Version/s: 2.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Set Moodle DEBUG >= NORMAL

      Get the REST demo client: https://github.com/moodlehq/moodle-local_wstemplate

      Test both JSON and XML format (you can change it in the demo client)

      Tests to execute for both format:

      • one call that is valid (run the client once, it creates two user. If the test users already exist, delete them)
      • one call that return an exception (any other run of the client when the users are already created)
      • one call that is valid with a missing value in the return value (Delete all previously created test users. Hack the create users external function to return an incomplete value. The REST server should return an error)
      • one call that is valid with a unexpected value in the return value (Delete all previously created test users. Hack the create users external function to return more values. The REST server should not return any error)
      Show
      Set Moodle DEBUG >= NORMAL Get the REST demo client: https://github.com/moodlehq/moodle-local_wstemplate Test both JSON and XML format (you can change it in the demo client) Tests to execute for both format: one call that is valid (run the client once, it creates two user. If the test users already exist, delete them) one call that return an exception (any other run of the client when the users are already created) one call that is valid with a missing value in the return value (Delete all previously created test users. Hack the create users external function to return an incomplete value. The REST server should return an error) one call that is valid with a unexpected value in the return value (Delete all previously created test users. Hack the create users external function to return more values. The REST server should not return any error)
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:

      Description

      • REST-XML server doesn't care about the primary type value
      • REST-JSON/XMLRPC/SOAP servers raised an exception if the primary type is not matching.

      The good thing of validating is that we guarantee Moodle web services always return values that match the description. The bad thing is that is not very flexible with "hacky" Moodle sites that have weird values in their DB.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/11