Skip to content

test cadl sample #3624

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

test cadl sample #3624

wants to merge 2 commits into from

Conversation

dw511214992
Copy link

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

Azure 1st Party Service can try out the Shift Left experience to initiate API design review from ADO code repo. If you are interested, may request engineering support by filling in with the form https://aka.ms/ShiftLeftSupportForm.

Changelog

Add a changelog entry for this PR by answering the following questions:

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify
  2. When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
  3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
  4. If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the swagger is published.
    • SDK of .NET (need service team to ensure code readiness)
    • SDK of Python
    • SDK of Java
    • SDK of Js
    • SDK of Go
    • PowerShell
    • CLI
    • Terraform
    • No refresh required for updates in this PR

Contribution checklist:

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

Applicability: ⚠️

If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

  • Change to data plane APIs
  • Adding new properties
  • All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

  • Check this box if any of the following appy to the PR so that the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review. Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.

    • Adding a new service
    • Adding new API(s)
    • Adding a new API version
      -[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.
  • Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in a stable version
  • Removing properties in a stable version
  • Removing API version(s) in a stable version
  • Updating API in a stable or public preview version with Breaking Change Validation errors
  • Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.

Please follow the link to find more details on PR review process.

@openapi-pipeline-app-test
Copy link

openapi-pipeline-app-test bot commented Jan 6, 2023

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️LintDiff succeeded [Detail] [Expand]
Validation passes for LintDiff.
️️✔️PR Summary succeeded [Detail] [Expand]
️️✔️[Staging] Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️❌Avocado: 2 Errors, 0 Warnings failed [Detail]
Rule Message
MISSING_README Can not find readme.md in the folder. If no readme.md file, it will block SDK generation.
folder: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples
MISSING_README Can not find readme.md in the folder. If no readme.md file, it will block SDK generation.
folder: data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview
️❌ModelValidation: 14 Errors, 0 Warnings failed [Detail]
Rule Message
XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Widgets_ListWidgets.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L24:14
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: details
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L365:37
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_GetWidgetSample.json
XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Widgets_CreateOrUpdateWidget.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L121:16
RESPONSE_BODY_NOT_IN_EXAMPLE Response statusCode 202 for operation Widgets_DeleteWidget has no response body provided in the example, however the response does have a "schema" defined in the swagger spec.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L249:22
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json#L8:16
RESPONSE_STATUS_CODE_NOT_IN_SPEC Response statusCode 204 for operation Widgets_DeleteWidget is provided in exampleResponseValue, however it is not present in the swagger spec.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L249:22
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json#L8:16
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: details
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L365:37
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json
XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Widgets_GetWidgetOperationStatus.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L297:14
XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Widgets_ListWidgets.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L24:14
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: details
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L365:37
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_GetWidgetSample.json
XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Widgets_CreateOrUpdateWidget.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L121:16
RESPONSE_BODY_NOT_IN_EXAMPLE Response statusCode 202 for operation Widgets_DeleteWidget has no response body provided in the example, however the response does have a "schema" defined in the swagger spec.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L249:22
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json#L8:16
RESPONSE_STATUS_CODE_NOT_IN_SPEC Response statusCode 204 for operation Widgets_DeleteWidget is provided in exampleResponseValue, however it is not present in the swagger spec.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L249:22
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json#L8:16
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: details
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L365:37
ExampleUrl: preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json
XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Widgets_GetWidgetOperationStatus.
Url: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L297:14
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
️️✔️~[Staging] SwaggerAPIView succeeded [Detail] [Expand]
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️[Staging] PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️[Staging] SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️[Staging] SDK Track2 Validation succeeded [Detail] [Expand]
Validation passes for SDKTrack2Validation
️❌CadlValidation: 1 Errors, 2 Warnings failed [Detail]
Rule Message
MissingPackageJson "details":"The 'package.json' is missing in the cadl folder specification/contosowidgetmanager/Contoso.WidgetManager.Shared,
please ensure the 'package.json' is added in the PR."
⚠️ MissingCadlProjectConfig "details":"The configuration 'output-file' for '@azure-tools/cadl-autorest' is missing in the cadl-project.yaml under folder specification/contosowidgetmanager/Contoso.WidgetManager,
please ensure it is added in the configuration of the emitter '@azure-tools/cadl-autorest'."
⚠️ MissingCadlProjectConfig "details":"The configuration 'azure-resource-provider-folder' for '@azure-tools/cadl-autorest' is missing in the cadl-project.yaml under folder specification/contosowidgetmanager/Contoso.WidgetManager,
please ensure it is added in the configuration of the emitter '@azure-tools/cadl-autorest'."
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app-test
Copy link

openapi-pipeline-app-test bot commented Jan 6, 2023

Swagger Generation Artifacts

️️✔️[Staging] ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
️️✔️[Staging] SDK Breaking Change Tracking succeeded [Detail] [Expand]

Breaking Changes Tracking

️⚠️ azure-sdk-for-python warning [Detail]
  • ⚠️Warning [Logs] Generate from d9e3a7a0b507440765ec12d590661ba67d367215. SDK Automation 14.0.0
    command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
    cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
    command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
    cmderr	[automation_generate.sh]
    cmderr	[automation_generate.sh] npm notice New major version of npm available! 8.19.2 -> 9.2.0
    cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.2.0>
    cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
    cmderr	[automation_generate.sh] npm notice
    warn	No file changes detected after generation
    warn	No package detected after generation
️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from d9e3a7a0b507440765ec12d590661ba67d367215. SDK Automation 14.0.0
    command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
  • ️✔️Azure.Contoso.Widgetmanager [View full logs]  [Preview SDK Changes]
    info	[Changelog]
️❌ azure-sdk-for-js failed [Detail]
  • Failed [Logs] Generate from d9e3a7a0b507440765ec12d590661ba67d367215. SDK Automation 14.0.0
    command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
    warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
    command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
    cmderr	[automation_generate.sh] [ERROR] Error:
    cmderr	[automation_generate.sh] [ERROR] An error occurred while run build for cadl project: "specification/contosowidgetmanager/Contoso.WidgetManager":
    cmderr	[automation_generate.sh] [ERROR] Err: Error: Command failed: rush build -t @azure-rest/contosowidgetmanager-rest
    cmderr	[automation_generate.sh] [ERROR] Stderr: "null"
    cmderr	[automation_generate.sh] [ERROR] Stdout: "null"
    cmderr	[automation_generate.sh] [ERROR] ErrorStack: "Error: Command failed: rush build -t @azure-rest/contosowidgetmanager-rest
    cmderr	[automation_generate.sh] [ERROR]     at checkExecSyncError (node:child_process:841:11)
    cmderr	[automation_generate.sh] [ERROR]     at Object.execSync (node:child_process:912:15)
    cmderr	[automation_generate.sh] [ERROR]     at Object.<anonymous> (/opt/hostedtoolcache/node/16.17.1/x64/lib/node_modules/azure-tools-js-sdk-release-tools/dist/llc/generateRLCInPipeline/generateRLCInPipeline.js:196:29)
    cmderr	[automation_generate.sh] [ERROR]     at Generator.next (<anonymous>)
    cmderr	[automation_generate.sh] [ERROR]     at fulfilled (/opt/hostedtoolcache/node/16.17.1/x64/lib/node_modules/azure-tools-js-sdk-release-tools/node_modules/tslib/tslib.js:112:62)
    cmderr	[automation_generate.sh] [ERROR]     at processTicksAndRejections (node:internal/process/task_queues:96:5)"
  • @azure-rest/contosowidgetmanager-rest [View full logs]  [Preview SDK Changes]
    info	[Changelog]
    error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
️⚠️ azure-sdk-for-java warning [Detail]
  • ⚠️Warning [Logs] Generate from d9e3a7a0b507440765ec12d590661ba67d367215. SDK Automation 14.0.0
    command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
    cmderr	[init.sh] [notice] A new release of pip available: 22.3 -> 22.3.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    cmderr	[init.sh] [notice] A new release of pip available: 22.3 -> 22.3.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
    cmderr	[generate.py] npm notice
    cmderr	[generate.py] npm notice New major version of npm available! 8.15.0 -> 9.2.0
    cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.2.0>
    cmderr	[generate.py] npm notice Run `npm install -g [email protected]` to update!
    cmderr	[generate.py] npm notice
  • ️✔️azure-contoso-widgetmanager [View full logs]  [Preview SDK Changes]
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app-test
Copy link

openapi-pipeline-app-test bot commented Jan 6, 2023

Generated ApiView

Language Package Name ApiView Link
Java azure-contoso-widgetmanager https://apiviewstaging.azurewebsites.net/Assemblies/Review/bcec7009b2e34143b66afbd7f397f019
.Net Azure.Contoso.Widgetmanager https://apiviewstaging.azurewebsites.net/Assemblies/Review/03d6ebdd940e48b79a90d5f722a2bbb2

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

Successfully merging this pull request may close these issues.

3 participants