Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21344

[REST Spec] Wrong xml tag on the response of create view

    Details

      Description

      On response example of REST API Spec: 1.3.2.7.1.1 XML Example
      ( https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/specifications/rest/REST-API-V2.rst#view )

      The XML response starts:

      <?xml version="1.0" encoding="UTF-8"?>
      <View href="/content/views/TitleView" media-type="application/vnd.ez.api.View+xml">
        <identifier>TitleView</identifier>
        <User href="/user/users/14" media-type="vnd.ez.api.User+xml"/>
        <public>false</public>
        <Query>
          <Criteria>
            <FullTextCritierion>Title</FieldCritierion>
          </Criteria>
      

      The XML code inside Criteria is incorrect FullTextCritierion - FieldCritierion

        Issue Links

          Activity

          Show
          Marcos Loureiro (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/469
          Show
          Bertrand Dunogier added a comment - New PR: https://github.com/ezsystems/ezpublish-kernel/pull/537 .
          Hide
          Bertrand Dunogier added a comment -

          No, it won't be backported to 5.2, unless we classify it as a blocker. I don't think we should, as the online version usually acts as a reference, even though this might not be ideal. I don't think we should expect people to go dig through the rest spec in the version they have downloaded.

          I have committed one more fix for another occurrence of the same mistake: https://github.com/ezsystems/ezpublish-kernel/commit/04d1876e6fbc4a75d5ffedaa76e015e1694d0071.

          Show
          Bertrand Dunogier added a comment - No, it won't be backported to 5.2, unless we classify it as a blocker. I don't think we should, as the online version usually acts as a reference, even though this might not be ideal. I don't think we should expect people to go dig through the rest spec in the version they have downloaded. I have committed one more fix for another occurrence of the same mistake: https://github.com/ezsystems/ezpublish-kernel/commit/04d1876e6fbc4a75d5ffedaa76e015e1694d0071 .
          Hide
          Joao Pingo (Inactive) added a comment -

          @Bertrand
          Running the test as documented returns the correct objects ... but the response is 200 Ok, in doc we have 201 Created (in line 2101)

          Show
          Joao Pingo (Inactive) added a comment - @Bertrand Running the test as documented returns the correct objects ... but the response is 200 Ok, in doc we have 201 Created (in line 2101)
          Hide
          Bertrand Dunogier added a comment -

          Actually, the example says 201, but the Response example a couple lines ago says 200...

          But actually, this particular one is a bit trickier. The specs say that a POST request to /content/views will create a view, and return the results. But it doesn't. This isn't implemented yet.

          So technically, it is correct that we return 200 and not 201, since nothing is created. I'd say that when storage is actually implemented, the response should be changed to 201.

          I guess the doc needs to be updated to reflect that.

          Show
          Bertrand Dunogier added a comment - Actually, the example says 201, but the Response example a couple lines ago says 200... But actually, this particular one is a bit trickier. The specs say that a POST request to /content/views will create a view , and return the results. But it doesn't. This isn't implemented yet. So technically, it is correct that we return 200 and not 201, since nothing is created. I'd say that when storage is actually implemented, the response should be changed to 201. I guess the doc needs to be updated to reflect that.
          Hide
          Bertrand Dunogier added a comment -

          Doc pull request ezpublish-kernel#772

          Show
          Bertrand Dunogier added a comment - Doc pull request ezpublish-kernel#772
          Hide
          Joao Pingo (Inactive) added a comment -

          QA Approved

          Show
          Joao Pingo (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Marcos Loureiro (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 15 minutes
                4h 15m