Patch #28564

JSON API responses cannot have elements named 'request' or 'response'

Added by Jens Krämer 8 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Plugin API
Target version:4.0.0

Description

I stumbled upon this while creating a Plugin with an API.

The problem is that Builders::Structure declares attr_accessor :request, :response. As a consequence, these get called instead of Structure#method_missing when doing api.request or api.response in a .rsb template.

This patch adds a test illustrating the problem and replaces the accessors with direct instance variable usage.

0001-removes-request-and-response-accessors-from-Structur.patch Magnifier (2.5 KB) Jens Krämer, 2018-04-17 03:42

Associated revisions

Revision 17617
Added by Go MAEDA about 1 month ago

Removes request and response accessors from Structure class (#28564).

Patch by Jens Krämer.

History

#1 Updated by Go MAEDA 8 months ago

  • Target version set to Candidate for next minor release

#2 Updated by Go MAEDA 7 months ago

  • Category set to REST API
  • Target version changed from Candidate for next minor release to 4.1.0

Setting target version to 4.1.0.

#3 Updated by Go MAEDA about 1 month ago

  • Category changed from REST API to Plugin API
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0

Committed. Thank you for your contribution.

Also available in: Atom PDF