Feat/minimal api support#52
Closed
Creator-Solutions wants to merge 2 commits into
Closed
Conversation
…ribute @inertiajs/core v3 reads the initial page object from a <script type="application/json" data-page="app"> tag via getInitialPageFromDOM(), not from a data-page attribute on the root div. InertiaCore predates this change (last upstream commit Aug 2023), causing createInertiaApp to receive null and crash on initial boot. Updates Html() in ResponseFactory to emit the script tag with slash-escaped JSON, matching the SSR gateway's buildSSRBody format.
feat: add Minimal API support via IResult on Response and LocationResult
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Response now implements IResult in addition to IActionResult, enabling Inertia responses to be returned directly from Minimal API endpoints via IInertia.Render(). Inertia requests are handled by writing JSON directly to the response body without going through the MVC pipeline, while full page load requests fall back to the configured root view. LocationResult has received the same dual-interface treatment. Existing MVC controller usage is completely unchanged.