Skip to content

Users/vladbaja/export openapi for 21 1#94

Merged
vladbaja merged 18 commits intomasterfrom
users/vladbaja/export-openapi-for-21-1
Jul 1, 2021
Merged

Users/vladbaja/export openapi for 21 1#94
vladbaja merged 18 commits intomasterfrom
users/vladbaja/export-openapi-for-21-1

Conversation

@vladbaja
Copy link
Copy Markdown
Contributor

@vladbaja vladbaja commented Jul 1, 2021

What does this Pull Request accomplish?

Sync OpenAPI documents from AzDO.

Why should this Pull Request be merged?

Contains updates done during the 21.1 release cycle.

What testing has been done?

Tested in the development product.

Cameron Waterman and others added 18 commits April 2, 2021 15:03
# Justification
when a system was connected for the first time, the minion updated broadcast contains all 3 properties (connected, grains, sysapi) as properties which got updated, but the strategy for new clients did not have the case where all 3 were changed.

# Testing
Tested in the product.

# Checklist
- [X] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Added check for all system properties updated
# Justification
https://dev.azure.com/ni/DevCentral/_wiki/wikis/AppCentral.wiki/18625/Building-Finals-21.0-?anchor=pull-openapi-document-subtree-from-github

# Implementation
Pull OpenAPI docs from GitHub subrepo
git subrepo pull (merge) --force systemlink-openapi-documents/subtree

# Testing
N/A

# Checklist
~~- [ ] I tested changes to product code in product~~
~~- [ ] I considered updates to the wiki~~
~~- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product~~
… old python clients to sta...

# Justification
The OpenAPI description of contains an wrong
`operationId: getChannelPropertiesCount`
at the
  `/v1/files/{fileId}/groups:`
that should be named getGroups according to getChannels later on.
In the generated python client stubs the method is called getChannelPropertiesCount but returns the groups.

# Implementation
Duplicate the entry and make a redirect to make sure python scripts using the old operationId do not break.
Pick a path name that makes sure this entry is just there because of compatibility.
  `/v0/files/{fileId}/groups:`

# Related BUG

This is a proposed fix for the bug 1355793 allowing old python clients to stay stable with the generated stub.

# Decision

Because we do not believe that users are out there we just fix the OperationId

Related work items: #1355793
# Justification

#1379368

The Swagger documentation for tag history was missing the following routes:
* nitaghistorian/v2/storage
* nitaghistorian/v2/tags/insert-values
* nitaghistorian/v2/tags/delete-values-by-range
* nitaghistorian/v2/tags/flush-values
  * We do not want to document flush-values because it's a no-op in the new service. It was necessary in the old service for performance reasons.
* nitaghistorian/v2/tags/update-metadata
  * We do not want to document update-metadata because it only updates the copy of the metadata held by tag historian and causes tag historian to get out of sync with the tag service.

# Implementation
Added documentation.

# Testing
I imported the yml file into insomnia and tested the requests.

# Checklist
- [x] I tested changes to product code in product
- [x] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1379368
# Justification
Add the assets/{assetId}/file route description in yml, as described in the spec:
https://ni.visualstudio.com/DevCentral/_git/Skyline/pullrequest/147696

# Testing
Online editor.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Add route to link files to an asset
# Justification
Task 1438372: Update swagger doccumentation to include fileIds in create and update models.

# Implementation
Added fileIds property on Base Asset Model

# Testing

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Add fileIds on yml

Related work items: #1438372
…VED state

# Justification
#1402374

# Implementation
Updated models on update-assets route to include the new REMOVED state for asset presence.  Models in the AssetService have already been posted for review here:  !153662

# Testing
Verified YAML on swagger editor.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1402374
# Justification

Added support for exporting notebooks as HTML or PDF and excluding code input cells from the export.

#1411711
#1411744

# Implementation
HTML export is implemented via the `HTMLExporter` of `nbconvert` and works out of the box. PDF export is implemented via the `WebPDFExporter` of `nbconvert` for which we extended the Python package with pyppeteer and chromium in [this PR](https://dev.azure.com/ni/DevCentral/_git/Skyline/commit/0f17c51a7e580093009c81f037ab29d000e675ae?refName=refs%2Fheads%2Fmaster).

Because we updated the `nbconvert` dependency, I also had to update `papermill` and change the implementation of the `NINBExecEngine`. Because of this [breaking change](https://github.com/nteract/papermill/pull/472/files), the previous used `PapermillExecutePreprocessor` is no longer available. I re-implemented the logic to inject environment variables by using the new `PapermillNotebookClient`.

# Testing
Build the service locally and deployed it to a SystemLink Server installation. I verified that notebooks can be executed and the SystemLink specific environment variables are still injected. I also verified that notebooks can be exported as HTML and PDF, with or without excluding the code input cells.

I will add ATS tests for this in another PR.

# Checklist
- [x] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1411711, #1411744, #1446393
# Justification
The workspace support in LabVIEW File API requires backend support. Files of a certain workspace should be queryable.
The following four cases are supported:
- no workspace given => search everything
- (*) => search everything
- ws_id => search in that workspace
- ws_id,ws_id => search in those workspaces

# Implementation
Add workspace as query parameter and filter for workspace if set and not equal (*).

# Testing
Manual testing for *, one workspace, multiple workspaces
Implement unit tests

Related work items: #1449042
# Justification
https://ni.visualstudio.com/DevCentral/_workitems/edit/1469322/

# Implementation
![image.png](https://ni.visualstudio.com/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_apis/git/repositories/8159353b-4403-4eed-9a32-0c2ee30abe3d/pullRequests/164847/attachments/image.png)
![image (2).png](https://ni.visualstudio.com/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_apis/git/repositories/8159353b-4403-4eed-9a32-0c2ee30abe3d/pullRequests/164847/attachments/image%20%282%29.png)

# Testing
I testes on swagger online editor.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Add unlink route to swagger

Related work items: #1469322
…space membership backend changes

# Justification

#1475922

# Implementation
Updated documentation

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1475922
# Justification
The OpenAPI document we use to generate the python API with Swagger contains a broken response definition for /v2/tags/query-history.

# Implementation
The values object was moved from the root level of the schema, into the properties object. This matches the [HTTP API](https://demo.systemlink.io/niapis/?urls.primaryName=Tag%20Historian%20Service#/history/QueryHistory) expected response.

# Testing
Generated a new python client with https://editor.swagger.io/ and confirmed that I could access the values property after making a query-history response.

# Checklist
- [x] I tested changes to product code in product
- [-] I considered updates to the wiki
- [-] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Move values field under properties

Related work items: #1472381
# Justification
When adding the workspace supported recently, I had increased the operation version of listFiles from  3 to 4 initially. Later I decided to keep that version and add a queryFiles operation explicitly. Started of with the version number 2 to make a distinction between implementations with and without workspace support. But I forgot to change the description in the yml file.
# Justification
We're about to add this support to the LV API and without increasing the version number, we're not able to tell if force is supported by the backend. This enables us to check for support and print a meaningful error message.

'Force' has just recently been added and wasn't release yet.
…naries

Added example for accessing values under dictionaries like grains using casts.
# Kind of Change
- [X] Simple cherry pick (no manual conflict resolution)
- [ ] Cherry pick (with manual conflict resolution)
- [ ] Not a cherry pick; direct change into release

# Justification
Earlier in the release I updated the asset-summary route to return more data and avoid multiple calls for asset counts.
I forgot to update the swagger then, doing it now.

Cherry picked from !178881
@vladbaja vladbaja requested a review from maxgax July 1, 2021 10:04
@vladbaja vladbaja merged commit 41157fa into master Jul 1, 2021
@vladbaja vladbaja deleted the users/vladbaja/export-openapi-for-21-1 branch July 1, 2021 14:37
brian-poteet-ni pushed a commit that referenced this pull request Oct 5, 2021
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.

9 participants