Skip to content

Feature/add routing manifest support#1

Open
sunchayn wants to merge 15 commits intov2.xfrom
feature/add-routing-manifest-support
Open

Feature/add routing manifest support#1
sunchayn wants to merge 15 commits intov2.xfrom
feature/add-routing-manifest-support

Conversation

@sunchayn
Copy link
Copy Markdown
Member

@sunchayn sunchayn commented Aug 3, 2022

Boom,

first, the resolution strategy, if it is alright I can move to the commands part 👌

@sunchayn sunchayn requested review from juampi92 and khalilst August 3, 2022 10:38
@sunchayn sunchayn self-assigned this Aug 3, 2022
Comment thread publishable/config/api.php Outdated
| strategy for each Resource in every version.
*/

'routing_manifest_path' => storage_path('api-resources/manifest.json'),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be in the Laravel's framework cache? bootstrap/cache

image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Copy link
Copy Markdown
Member Author

@sunchayn sunchayn Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/APIResourceManager.php Outdated
* @return string
*/
protected function parseClassname($classname, $forceLatest = false)
protected function parseClassname(string $classname, bool $forceLatest = false): string
Copy link
Copy Markdown
Member

@juampi92 juampi92 Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method that you're looking to modify is

public function resolve($classname)

The difference is that this method will simply try to resolve the class from the version name. This is how the manifest should be made

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunchayn sunchayn force-pushed the feature/add-routing-manifest-support branch from 819eaaf to 0e7adbd Compare August 3, 2022 12:40
@sunchayn sunchayn force-pushed the feature/add-routing-manifest-support branch from a98ead2 to c2c84f5 Compare August 3, 2022 14:28
@sunchayn sunchayn requested a review from juampi92 August 3, 2022 14:41
Comment thread src/Resolvers/Resolver.php Outdated
/**
* @return class-string<JsonResource|ResourceCollection>
*/
abstract protected function resolve(): ?string;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's resolve or exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants