Skip to content

[Blueprints] Fix ModelValidation Errors#6394

Closed
filizt wants to merge 1 commit intoAzure:masterfrom
filizt:ModelValidationError
Closed

[Blueprints] Fix ModelValidation Errors#6394
filizt wants to merge 1 commit intoAzure:masterfrom
filizt:ModelValidationError

Conversation

@filizt
Copy link
Contributor

@filizt filizt commented Jun 20, 2019

Creating a PR to follow up on model validation errors that started failing the checks in the last two PRs. One example can be found here: https://dev.azure.com/azure-sdk/public/_build/results?buildId=48989

There is currently no spec change committed in the PR, we'd like to discuss to find a good fix for the issue before we commit a spec change.

Issue summary:
These failures are specifically around the ParameterValueBase property and its polymorphic relation to ParameterValue. It seems like the model validation tool is not seeing this relationship and complaining that the "value" parameter in the request examples are not complaint.

We ideally want to find out the best way to model the following JSON:

 "parameter": {
  "foo": {
    "value": 42
  },
  "bar": {
    "reference": {
       ...
    }
  }
}

The parameter value should either be have a reference or value property set, but (ideally) not both. One workaround I can think of is just to create a ParameterValue definition in the swagger with both value and reference properties as optional, but I'm hoping you can recommend some better solution.

Latest improvements:

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Contribution checklist:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Jun 20, 2019

SDK Automation [Logs] (Generated from 6f46ec5)

@AutorestCI
Copy link

AutorestCI commented Jun 20, 2019

Automation for azure-sdk-for-go

Unable to detect any generation context from this PR.

@AutorestCI
Copy link

AutorestCI commented Jun 20, 2019

Automation for azure-sdk-for-python

Unable to detect any generation context from this PR.

@AutorestCI
Copy link

AutorestCI commented Jun 20, 2019

Automation for azure-sdk-for-java

Unable to detect any generation context from this PR.

@AutorestCI
Copy link

AutorestCI commented Jun 20, 2019

Automation for azure-sdk-for-ruby

Unable to detect any generation context from this PR.

@filizt
Copy link
Contributor Author

filizt commented Jun 20, 2019

@sergey-shandar this is the follow up PR to our discussion.

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@filizt filizt changed the title [Blueprints] Fix ModelValidator Errors [Blueprints] Fix ModelValidation Errors Jun 20, 2019
@filizt
Copy link
Contributor Author

filizt commented Jun 20, 2019

Issue is being tracked here: Azure/oav#431 Closing the PR.

@filizt filizt closed this Jun 20, 2019
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.

4 participants