Ticket #2528514 (closed defect)

Reporter


Kapil Thangavelu
Opened: 01/5/10
Last modified: 09/7/10
Status: closed
Type: defect
Resolution: fixed

Owner


Jenny Donnelly
Target Release: 3.2.0
Priority: P4 (low)
Summary: Data Source JSON Schema is hardcoded to IO Datasource
Description:

for unit testing we're constructing local datasources and utilizing them with our unit tests. unfortunately jsonschema needlessly hardcodes its functionality to an io datasource. Changing it to a
local datasource allows it to be utilized more easily in local unit tests, and as the IO datasource extends local preserves the existing conditional.

Type: defect Observed in Version: 3.0.0
Component: DataSchema Severity: S3 (normal)
Assigned To: Jenny Donnelly Target Release: 3.2.0
Location: Library Code Priority: P4 (low)
Tags: Relates To:
Browsers: All
URL:
Test Information:

the problem can be see via source inspection of the datasource json schema plugin.

Change History

Jenny Donnelly

YUI Developer

Posted: 03/22/10
  • location changed to Library Code
  • milestone changed to 3.NEXT
  • priority changed to P3 (normal)
  • status changed from new to accepted

Will revisit why DS+schema plugins are tightly coupled to IO.

Sidnei da Silva

YUI Contributor

Posted: 03/23/10

FYI, this is the patch we are using locally:


=


modified file 'static/yui/datasource/datasource-jsonschema.js'
--- static/yui/datasource/datasource-jsonschema.js 2009-09-29 22:48:56 +0000

+++ static/yui/datasource/datasource-jsonschema.js 2010-03-23 18:49:33 +0000

@@ -90,7 +90,7 @@
* @protected
*/
_beforeDefDataFn: function(e) {
- var data = (Y.DataSource.IO && (this.get("host") instanceof Y.DataSource.IO) && Y.Lang.isString(e.data.responseText)) ? e.data.responseText : e.data,

+ var data = (Y.DataSource.Local && (this.get("host") instanceof Y.DataSource.Local) && Y.Lang.isString(e.data.responseText)) ? e.data.responseText : e.data,

response = Y.DataSchema.JSON.apply(this.get("schema"), data);

// Default

Jenny Donnelly

YUI Developer

Posted: 04/9/10
  • milestone changed from 3.NEXT to 3.2.0

Jenny Donnelly

YUI Developer

Posted: 06/30/10
  • priority changed from P3 (normal) to P4 (low)

Jenny Donnelly

YUI Developer

Posted: 07/16/10
  • resolution changed to fixed
  • status changed from accepted to checkedin

[fix #2528514] Rm hardcoded ds-io from ds-jsonschema.
View Commit:

Jenny Donnelly

YUI Developer

Posted: 07/20/10

[fix #2528514] Rm hardcoded ds-io from ds-jsonschema.
View Commit:

George

YUI Developer

Posted: 09/7/10
  • status changed from checkedin to closed