Skip to content

Commit 2911edc

Browse files
committed
fixing urls
1 parent fcbe18c commit 2911edc

6 files changed

Lines changed: 126 additions & 38 deletions

File tree

docs/Model/FeedPostLink.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**text** | **string** | | [optional]
78
**title** | **string** | | [optional]
8-
**link** | **string** | | [optional]
9+
**description** | **string** | | [optional]
10+
**url** | **string** | | [optional]
911

1012
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/FeedPostMediaItem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**title** | **string** | | [optional]
8-
**link** | **string** | | [optional]
8+
**link_url** | **string** | | [optional]
99
**sizes** | [**\FastComments\Client\Model\FeedPostMediaItemAsset[]**](FeedPostMediaItemAsset.md) | |
1010

1111
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

lib/Model/FeedPostLink.php

Lines changed: 84 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ class FeedPostLink implements ModelInterface, ArrayAccess, \JsonSerializable
5858
* @var string[]
5959
*/
6060
protected static $openAPITypes = [
61+
'text' => 'string',
6162
'title' => 'string',
62-
'link' => 'string'
63+
'description' => 'string',
64+
'url' => 'string'
6365
];
6466

6567
/**
@@ -70,8 +72,10 @@ class FeedPostLink implements ModelInterface, ArrayAccess, \JsonSerializable
7072
* @psalm-var array<string, string|null>
7173
*/
7274
protected static $openAPIFormats = [
75+
'text' => null,
7376
'title' => null,
74-
'link' => null
77+
'description' => null,
78+
'url' => null
7579
];
7680

7781
/**
@@ -80,8 +84,10 @@ class FeedPostLink implements ModelInterface, ArrayAccess, \JsonSerializable
8084
* @var boolean[]
8185
*/
8286
protected static array $openAPINullables = [
87+
'text' => false,
8388
'title' => false,
84-
'link' => false
89+
'description' => false,
90+
'url' => false
8591
];
8692

8793
/**
@@ -170,8 +176,10 @@ public function isNullableSetToNull(string $property): bool
170176
* @var string[]
171177
*/
172178
protected static $attributeMap = [
179+
'text' => 'text',
173180
'title' => 'title',
174-
'link' => 'link'
181+
'description' => 'description',
182+
'url' => 'url'
175183
];
176184

177185
/**
@@ -180,8 +188,10 @@ public function isNullableSetToNull(string $property): bool
180188
* @var string[]
181189
*/
182190
protected static $setters = [
191+
'text' => 'setText',
183192
'title' => 'setTitle',
184-
'link' => 'setLink'
193+
'description' => 'setDescription',
194+
'url' => 'setUrl'
185195
];
186196

187197
/**
@@ -190,8 +200,10 @@ public function isNullableSetToNull(string $property): bool
190200
* @var string[]
191201
*/
192202
protected static $getters = [
203+
'text' => 'getText',
193204
'title' => 'getTitle',
194-
'link' => 'getLink'
205+
'description' => 'getDescription',
206+
'url' => 'getUrl'
195207
];
196208

197209
/**
@@ -251,8 +263,10 @@ public function getModelName()
251263
*/
252264
public function __construct(?array $data = null)
253265
{
266+
$this->setIfExists('text', $data ?? [], null);
254267
$this->setIfExists('title', $data ?? [], null);
255-
$this->setIfExists('link', $data ?? [], null);
268+
$this->setIfExists('description', $data ?? [], null);
269+
$this->setIfExists('url', $data ?? [], null);
256270
}
257271

258272
/**
@@ -297,6 +311,33 @@ public function valid()
297311
}
298312

299313

314+
/**
315+
* Gets text
316+
*
317+
* @return string|null
318+
*/
319+
public function getText()
320+
{
321+
return $this->container['text'];
322+
}
323+
324+
/**
325+
* Sets text
326+
*
327+
* @param string|null $text text
328+
*
329+
* @return self
330+
*/
331+
public function setText($text)
332+
{
333+
if (is_null($text)) {
334+
throw new \InvalidArgumentException('non-nullable text cannot be null');
335+
}
336+
$this->container['text'] = $text;
337+
338+
return $this;
339+
}
340+
300341
/**
301342
* Gets title
302343
*
@@ -325,28 +366,55 @@ public function setTitle($title)
325366
}
326367

327368
/**
328-
* Gets link
369+
* Gets description
370+
*
371+
* @return string|null
372+
*/
373+
public function getDescription()
374+
{
375+
return $this->container['description'];
376+
}
377+
378+
/**
379+
* Sets description
380+
*
381+
* @param string|null $description description
382+
*
383+
* @return self
384+
*/
385+
public function setDescription($description)
386+
{
387+
if (is_null($description)) {
388+
throw new \InvalidArgumentException('non-nullable description cannot be null');
389+
}
390+
$this->container['description'] = $description;
391+
392+
return $this;
393+
}
394+
395+
/**
396+
* Gets url
329397
*
330398
* @return string|null
331399
*/
332-
public function getLink()
400+
public function getUrl()
333401
{
334-
return $this->container['link'];
402+
return $this->container['url'];
335403
}
336404

337405
/**
338-
* Sets link
406+
* Sets url
339407
*
340-
* @param string|null $link link
408+
* @param string|null $url url
341409
*
342410
* @return self
343411
*/
344-
public function setLink($link)
412+
public function setUrl($url)
345413
{
346-
if (is_null($link)) {
347-
throw new \InvalidArgumentException('non-nullable link cannot be null');
414+
if (is_null($url)) {
415+
throw new \InvalidArgumentException('non-nullable url cannot be null');
348416
}
349-
$this->container['link'] = $link;
417+
$this->container['url'] = $url;
350418

351419
return $this;
352420
}

lib/Model/FeedPostMediaItem.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class FeedPostMediaItem implements ModelInterface, ArrayAccess, \JsonSerializabl
5959
*/
6060
protected static $openAPITypes = [
6161
'title' => 'string',
62-
'link' => 'string',
62+
'link_url' => 'string',
6363
'sizes' => '\FastComments\Client\Model\FeedPostMediaItemAsset[]'
6464
];
6565

@@ -72,7 +72,7 @@ class FeedPostMediaItem implements ModelInterface, ArrayAccess, \JsonSerializabl
7272
*/
7373
protected static $openAPIFormats = [
7474
'title' => null,
75-
'link' => null,
75+
'link_url' => null,
7676
'sizes' => null
7777
];
7878

@@ -83,7 +83,7 @@ class FeedPostMediaItem implements ModelInterface, ArrayAccess, \JsonSerializabl
8383
*/
8484
protected static array $openAPINullables = [
8585
'title' => false,
86-
'link' => false,
86+
'link_url' => false,
8787
'sizes' => false
8888
];
8989

@@ -174,7 +174,7 @@ public function isNullableSetToNull(string $property): bool
174174
*/
175175
protected static $attributeMap = [
176176
'title' => 'title',
177-
'link' => 'link',
177+
'link_url' => 'linkUrl',
178178
'sizes' => 'sizes'
179179
];
180180

@@ -185,7 +185,7 @@ public function isNullableSetToNull(string $property): bool
185185
*/
186186
protected static $setters = [
187187
'title' => 'setTitle',
188-
'link' => 'setLink',
188+
'link_url' => 'setLinkUrl',
189189
'sizes' => 'setSizes'
190190
];
191191

@@ -196,7 +196,7 @@ public function isNullableSetToNull(string $property): bool
196196
*/
197197
protected static $getters = [
198198
'title' => 'getTitle',
199-
'link' => 'getLink',
199+
'link_url' => 'getLinkUrl',
200200
'sizes' => 'getSizes'
201201
];
202202

@@ -258,7 +258,7 @@ public function getModelName()
258258
public function __construct(?array $data = null)
259259
{
260260
$this->setIfExists('title', $data ?? [], null);
261-
$this->setIfExists('link', $data ?? [], null);
261+
$this->setIfExists('link_url', $data ?? [], null);
262262
$this->setIfExists('sizes', $data ?? [], null);
263263
}
264264

@@ -335,28 +335,28 @@ public function setTitle($title)
335335
}
336336

337337
/**
338-
* Gets link
338+
* Gets link_url
339339
*
340340
* @return string|null
341341
*/
342-
public function getLink()
342+
public function getLinkUrl()
343343
{
344-
return $this->container['link'];
344+
return $this->container['link_url'];
345345
}
346346

347347
/**
348-
* Sets link
348+
* Sets link_url
349349
*
350-
* @param string|null $link link
350+
* @param string|null $link_url link_url
351351
*
352352
* @return self
353353
*/
354-
public function setLink($link)
354+
public function setLinkUrl($link_url)
355355
{
356-
if (is_null($link)) {
357-
throw new \InvalidArgumentException('non-nullable link cannot be null');
356+
if (is_null($link_url)) {
357+
throw new \InvalidArgumentException('non-nullable link_url cannot be null');
358358
}
359-
$this->container['link'] = $link;
359+
$this->container['link_url'] = $link_url;
360360

361361
return $this;
362362
}

test/Model/FeedPostLinkTest.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ public function testFeedPostLink()
8080
self::markTestIncomplete('Not implemented');
8181
}
8282

83+
/**
84+
* Test attribute "text"
85+
*/
86+
public function testPropertyText()
87+
{
88+
// TODO: implement
89+
self::markTestIncomplete('Not implemented');
90+
}
91+
8392
/**
8493
* Test attribute "title"
8594
*/
@@ -90,9 +99,18 @@ public function testPropertyTitle()
9099
}
91100

92101
/**
93-
* Test attribute "link"
102+
* Test attribute "description"
103+
*/
104+
public function testPropertyDescription()
105+
{
106+
// TODO: implement
107+
self::markTestIncomplete('Not implemented');
108+
}
109+
110+
/**
111+
* Test attribute "url"
94112
*/
95-
public function testPropertyLink()
113+
public function testPropertyUrl()
96114
{
97115
// TODO: implement
98116
self::markTestIncomplete('Not implemented');

test/Model/FeedPostMediaItemTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ public function testPropertyTitle()
9090
}
9191

9292
/**
93-
* Test attribute "link"
93+
* Test attribute "link_url"
9494
*/
95-
public function testPropertyLink()
95+
public function testPropertyLinkUrl()
9696
{
9797
// TODO: implement
9898
self::markTestIncomplete('Not implemented');

0 commit comments

Comments
 (0)