Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relese/v2.2.0 #30

Merged
merged 13 commits into from
Nov 15, 2019
Prev Previous commit
Next Next commit
Missing relationship object tests.
  • Loading branch information
fgulan committed Aug 24, 2019
commit 60616d4b01398692ee2e9aab6f2f18535ce7019a
52 changes: 50 additions & 2 deletions Example/Japx.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
objects = {

/* Begin PBXBuildFile section */
0A30B5C9231111820041F828 /* MissingRelationshipObject-JsonApi.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A30B5C62311117C0041F828 /* MissingRelationshipObject-JsonApi.json */; };
0A30B5CA231111850041F828 /* MissingRelationshipObject-Json.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A30B5C52311117C0041F828 /* MissingRelationshipObject-Json.json */; };
0A30B5CD231111A60041F828 /* MissingRelationshipObjects-Json.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A30B5CB231111A60041F828 /* MissingRelationshipObjects-Json.json */; };
0A30B5CE231111A60041F828 /* MissingRelationshipObjects-JsonApi.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A30B5CC231111A60041F828 /* MissingRelationshipObjects-JsonApi.json */; };
0A4CEF7621FF560400D3F0B8 /* RelationshipNoInclude-Json.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A4CEF7421FF560400D3F0B8 /* RelationshipNoInclude-Json.json */; };
0A4CEF7721FF560400D3F0B8 /* RelationshipNoInclude-JsonApi.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A4CEF7521FF560400D3F0B8 /* RelationshipNoInclude-JsonApi.json */; };
0A57D7FD231119AC0009FBEB /* MissingRelationshipObjectNull-Json.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A57D7FC231119AB0009FBEB /* MissingRelationshipObjectNull-Json.json */; };
0A57D7FF231119C10009FBEB /* MissingRelationshipObjectsEmpty-Json.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A57D7FE231119C10009FBEB /* MissingRelationshipObjectsEmpty-Json.json */; };
0A6C2FEF21FB3BB900D16186 /* EmptyRelationship-JsonApi.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A6C2FEE21FB3BB900D16186 /* EmptyRelationship-JsonApi.json */; };
0A6C2FF121FB3BD000D16186 /* EmptyRelationship-Json.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A6C2FF021FB3BD000D16186 /* EmptyRelationship-Json.json */; };
0A6C2FF621FB3F4900D16186 /* EmptyRelationshipDeep-Json.json in Resources */ = {isa = PBXBuildFile; fileRef = 0A6C2FF321FB3F4100D16186 /* EmptyRelationshipDeep-Json.json */; };
Expand Down Expand Up @@ -55,8 +61,14 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
0A30B5C52311117C0041F828 /* MissingRelationshipObject-Json.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "MissingRelationshipObject-Json.json"; sourceTree = "<group>"; };
0A30B5C62311117C0041F828 /* MissingRelationshipObject-JsonApi.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "MissingRelationshipObject-JsonApi.json"; sourceTree = "<group>"; };
0A30B5CB231111A60041F828 /* MissingRelationshipObjects-Json.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "MissingRelationshipObjects-Json.json"; sourceTree = "<group>"; };
0A30B5CC231111A60041F828 /* MissingRelationshipObjects-JsonApi.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "MissingRelationshipObjects-JsonApi.json"; sourceTree = "<group>"; };
0A4CEF7421FF560400D3F0B8 /* RelationshipNoInclude-Json.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "RelationshipNoInclude-Json.json"; sourceTree = "<group>"; };
0A4CEF7521FF560400D3F0B8 /* RelationshipNoInclude-JsonApi.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "RelationshipNoInclude-JsonApi.json"; sourceTree = "<group>"; };
0A57D7FC231119AB0009FBEB /* MissingRelationshipObjectNull-Json.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "MissingRelationshipObjectNull-Json.json"; sourceTree = "<group>"; };
0A57D7FE231119C10009FBEB /* MissingRelationshipObjectsEmpty-Json.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "MissingRelationshipObjectsEmpty-Json.json"; sourceTree = "<group>"; };
0A6C2FEE21FB3BB900D16186 /* EmptyRelationship-JsonApi.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "EmptyRelationship-JsonApi.json"; sourceTree = "<group>"; };
0A6C2FF021FB3BD000D16186 /* EmptyRelationship-Json.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "EmptyRelationship-Json.json"; sourceTree = "<group>"; };
0A6C2FF321FB3F4100D16186 /* EmptyRelationshipDeep-Json.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "EmptyRelationshipDeep-Json.json"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -131,6 +143,35 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
0A30B5C2231111360041F828 /* Include */ = {
isa = PBXGroup;
children = (
E18794FE2018CA7100E472C4 /* MissingRelationship-Json.json */,
E18794FF2018CA7100E472C4 /* MissingRelationship-JsonApi.json */,
);
path = Include;
sourceTree = "<group>";
};
0A30B5C3231111400041F828 /* Object */ = {
isa = PBXGroup;
children = (
0A30B5C52311117C0041F828 /* MissingRelationshipObject-Json.json */,
0A30B5C62311117C0041F828 /* MissingRelationshipObject-JsonApi.json */,
0A57D7FC231119AB0009FBEB /* MissingRelationshipObjectNull-Json.json */,
);
path = Object;
sourceTree = "<group>";
};
0A30B5C4231111460041F828 /* Array */ = {
isa = PBXGroup;
children = (
0A57D7FE231119C10009FBEB /* MissingRelationshipObjectsEmpty-Json.json */,
0A30B5CB231111A60041F828 /* MissingRelationshipObjects-Json.json */,
0A30B5CC231111A60041F828 /* MissingRelationshipObjects-JsonApi.json */,
);
path = Array;
sourceTree = "<group>";
};
0A4CEF7321FF560400D3F0B8 /* RelationshipNoInclude */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -325,8 +366,9 @@
E18794FD2018CA7100E472C4 /* MissingRelationship */ = {
isa = PBXGroup;
children = (
E18794FE2018CA7100E472C4 /* MissingRelationship-Json.json */,
E18794FF2018CA7100E472C4 /* MissingRelationship-JsonApi.json */,
0A30B5C2231111360041F828 /* Include */,
0A30B5C3231111400041F828 /* Object */,
0A30B5C4231111460041F828 /* Array */,
);
path = MissingRelationship;
sourceTree = "<group>";
Expand Down Expand Up @@ -461,15 +503,20 @@
2C5FA429202CA35D00399CC7 /* Images.xcassets in Resources */,
0A4CEF7721FF560400D3F0B8 /* RelationshipNoInclude-JsonApi.json in Resources */,
E18794FC2018AEC900E472C4 /* RecursivSample-JsonApi.json in Resources */,
0A57D7FD231119AC0009FBEB /* MissingRelationshipObjectNull-Json.json in Resources */,
E18795042018CA7100E472C4 /* MissingRelationship-JsonApi.json in Resources */,
E18795062018CA7100E472C4 /* ArticleExample-Json.json in Resources */,
0A30B5CE231111A60041F828 /* MissingRelationshipObjects-JsonApi.json in Resources */,
E18794F32018ABA000E472C4 /* ArticlePerson-Json.json in Resources */,
2C5FA42C202CA39500399CC7 /* Main.storyboard in Resources */,
E18795132018D76300E472C4 /* SimpleEncoding-Json.json in Resources */,
E18795102018D76300E472C4 /* RecursivRelationships-Json.json in Resources */,
0A6C2FF121FB3BD000D16186 /* EmptyRelationship-Json.json in Resources */,
0A57D7FF231119C10009FBEB /* MissingRelationshipObjectsEmpty-Json.json in Resources */,
E18795152018D76300E472C4 /* ExtraParams-JsonApi.json in Resources */,
E18795112018D76300E472C4 /* RecursivRelationships-JsonApi.json in Resources */,
0A30B5CD231111A60041F828 /* MissingRelationshipObjects-Json.json in Resources */,
0A30B5CA231111850041F828 /* MissingRelationshipObject-Json.json in Resources */,
E18795142018D76300E472C4 /* ExtraParams-Json.json in Resources */,
E18795122018D76300E472C4 /* SimpleEncoding-JsonApi.json in Resources */,
E18795032018CA7100E472C4 /* MissingRelationship-Json.json in Resources */,
Expand All @@ -478,6 +525,7 @@
0A6C2FF621FB3F4900D16186 /* EmptyRelationshipDeep-Json.json in Resources */,
2C5FA42D202CA39700399CC7 /* LaunchScreen.xib in Resources */,
0A4CEF7621FF560400D3F0B8 /* RelationshipNoInclude-Json.json in Resources */,
0A30B5C9231111820041F828 /* MissingRelationshipObject-JsonApi.json in Resources */,
0A6C2FEF21FB3BB900D16186 /* EmptyRelationship-JsonApi.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
81 changes: 51 additions & 30 deletions Example/Japx/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="duV-sn-OWJ">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="duV-sn-OWJ">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -195,34 +194,56 @@
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" keyboardDismissMode="onDrag" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="sfS-kD-zsN">
<rect key="frame" x="0.0" y="50" width="343" height="553"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<string key="text">{
"data": [{
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON API paints my bikeshed!",
"body": "The shortest article. Ever.",
"created": "2015-05-22T14:56:29.000Z",
"updated": "2015-05-22T14:56:28.000Z"
<mutableString key="text">{
Truba marked this conversation as resolved.
Show resolved Hide resolved
"data": [
{
"id": "33",
"type": "time_off_request",
"attributes": {
"status": "approved",
"start_date": "2019-01-14",
"end_date": "2019-01-31"
},
"relationships": {
"user": {
"data": {
"id": "25",
"type": "user"
}
},
"policy": {
"data": [{
"id": "24",
"type": "time_off_policy"
}, {
"id": "25",
"type": "time_off_policy"
}]
}
}
}
],
"included": [
{
"id": "25",
"type": "user",
"attributes": {
"id": 20550,
"name": "user name",
"email": "[email protected]",
"avatar": "",
"avatar_url": null
}
}
],
"meta": {
"total_pages": 1,
"total_count": 1
},
"relationships": {
"author": {
"data": {"id": "42", "type": "people"}
}
}
}],
"included": [
{
"type": "people",
"id": "42",
"attributes": {
"name": "John",
"age": 80,
"gender": "male"
}
"links": {
"self": "url link"
}
]
}</string>
}</mutableString>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
Expand Down Expand Up @@ -265,6 +286,6 @@
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="l1x-NH-VqX"/>
<segue reference="Vjg-iL-wIa"/>
</inferredMetricsTieBreakers>
</document>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"links" : {
"self" : "url link"
},
"meta" : {
"total_pages" : 1,
"total_count" : 1
},
"data" : [
{
"status" : "approved",
"policy" : [{
"id": "24",
"type": "time_off_policy"
}, {
"id": "25",
"type": "time_off_policy"
}],
"id" : "33",
"start_date" : "2019-01-14",
"type" : "time_off_request",
"end_date" : "2019-01-31",
"user" : {
"avatar" : "",
"id" : "25",
"email" : "[email protected]",
"type" : "user",
"name" : "user name"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"data": [
{
"id": "33",
"type": "time_off_request",
"attributes": {
"status": "approved",
"start_date": "2019-01-14",
"end_date": "2019-01-31"
},
"relationships": {
"user": {
"data": {
"id": "25",
"type": "user"
}
},
"policy": {
"data": [{
"id": "24",
"type": "time_off_policy"
}, {
"id": "25",
"type": "time_off_policy"
}]
}
}
}
],
"included": [
{
"id": "25",
"type": "user",
"attributes": {
"name": "user name",
"email": "[email protected]",
"avatar": "",
}
}
],
"meta": {
"total_pages": 1,
"total_count": 1
},
"links": {
"self": "url link"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"links" : {
"self" : "url link"
},
"meta" : {
"total_pages" : 1,
"total_count" : 1
},
"data" : [
{
"status" : "approved",
"policy" : [],
"id" : "33",
"start_date" : "2019-01-14",
"type" : "time_off_request",
"end_date" : "2019-01-31",
"user" : {
"avatar" : "",
"id" : "25",
"email" : "[email protected]",
"type" : "user",
"name" : "user name"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"links" : {
"self" : "url link"
},
"meta" : {
"total_pages" : 1,
"total_count" : 1
},
"data" : [
{
"status" : "approved",
"policy" : {
"id": "24",
"type": "time_off_policy"
},
"id" : "33",
"start_date" : "2019-01-14",
"type" : "time_off_request",
"end_date" : "2019-01-31",
"user" : {
"avatar" : "",
"id" : "25",
"email" : "[email protected]",
"type" : "user",
"name" : "user name"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"data": [
{
"id": "33",
"type": "time_off_request",
"attributes": {
"status": "approved",
"start_date": "2019-01-14",
"end_date": "2019-01-31"
},
"relationships": {
"user": {
"data": {
"id": "25",
"type": "user"
}
},
"policy": {
"data": {
"id": "24",
"type": "time_off_policy"
}
}
}
}
],
"included": [
{
"id": "25",
"type": "user",
"attributes": {
"name": "user name",
"email": "[email protected]",
"avatar": "",
}
}
],
"meta": {
"total_pages": 1,
"total_count": 1
},
"links": {
"self": "url link"
}
}
Loading