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

Feature/add routing manifest support #1

Open
wants to merge 15 commits into
base: v2.x
Choose a base branch
from

Conversation

sunchayn
Copy link
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
| strategy for each Resource in every version.
*/

'routing_manifest_path' => storage_path('api-resources/manifest.json'),
Copy link
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
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
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.

*/
protected function parseClassname($classname, $forceLatest = false)
protected function parseClassname(string $classname, bool $forceLatest = false): string
Copy link
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
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
/**
* @return class-string<JsonResource|ResourceCollection>
*/
abstract protected function resolve(): ?string;
Copy link
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