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

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.2
    • 2.0.4, 2.1.1
    • Web Services
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • MOODLE_22_STABLE
    • 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)

      • 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.

            jerome Jérôme Mouneyrac
            jerome Jérôme Mouneyrac
            Sam Hemelryk Sam Hemelryk
            Sam Hemelryk Sam Hemelryk
            Aparup Banerjee Aparup Banerjee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.