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

Schema validation fails for AppUpdatePolicy when requesting AppInstallation #5

Open
nhovratov opened this issue Mar 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nhovratov
Copy link

In SchemaStorage.php line 145:

File: internal://provided-schema/ is found, but could not resolve fragment: #/components/schemas/de.mittwald.v1.app.AppUpdatePolicy

Code:

        $input = [
            'appVersionId' => $createAppStruct->appVersionIdentifier,
            'description' => $createAppStruct->name,
            'updatePolicy' => AppUpdatePolicy::none->value,
            'userInputs' => [],
        ];
        $requestBody = RequestAppinstallationRequestBody::buildFromInput($input);

Disabling validation and using the body in the request works.

@martin-helmich
Copy link
Member

Hey Nikita! 👋 The schema validation should work better now... Right now, the API client uses a custom validator that disables reference lookups (which is OK in this case, because the sub-schema is still validated, when the respective subobjects are constructed). #11 also added a few test cases to assert that your specific case works as intended.

Let me know if this solves your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants