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

Add task.json schema file #146

Merged
merged 3 commits into from Jan 29, 2018

Conversation

Projects
None yet
6 participants
@AArnott
Member

AArnott commented Sep 25, 2016

Fixes Microsoft/vsts-tasks#1854

@bryanmacfarlane

This comment has been minimized.

Show comment
Hide comment
@bryanmacfarlane

bryanmacfarlane Oct 3, 2016

Member

Eric and Yash, can you review the schema file?

Member

bryanmacfarlane commented Oct 3, 2016

Eric and Yash, can you review the schema file?

"Node": {
"$ref": "#/definitions/executionObject"
},
"Bash": {

This comment has been minimized.

@ericsciple

ericsciple Oct 5, 2016

Member

Bash isn't an execution handler.

Not required in this merge, but I'm inclined to remove the ones that we really don't advertise for custom tasks (i.e. leave Node and PowerShell3 only). I might delete the other execution handlers from the schema after the merge and add them back as needed (hopefully not needed).

Also not all of the execution objects properties are the same for all handlers. I can track down those details after the merge.

@ericsciple

ericsciple Oct 5, 2016

Member

Bash isn't an execution handler.

Not required in this merge, but I'm inclined to remove the ones that we really don't advertise for custom tasks (i.e. leave Node and PowerShell3 only). I might delete the other execution handlers from the schema after the merge and add them back as needed (hopefully not needed).

Also not all of the execution objects properties are the same for all handlers. I can track down those details after the merge.

This comment has been minimized.

@AArnott

AArnott Oct 5, 2016

Member

Thanks, @ericsciple. I developed this JSON schema to validate all the tasks in the vsts-tasks repo. So if you see values that aren't supposed to be there, there is probably some task in that repo that uses that value, just FYI.

@AArnott

AArnott Oct 5, 2016

Member

Thanks, @ericsciple. I developed this JSON schema to validate all the tasks in the vsts-tasks repo. So if you see values that aren't supposed to be there, there is probably some task in that repo that uses that value, just FYI.

@ericsciple

This comment has been minimized.

Show comment
Hide comment
@ericsciple

ericsciple Oct 5, 2016

Member

@bryanmacfarlane do you have any thoughts where the file should go? I'm guessing once we choose a location, we need to leave it there.

This is nice.

Member

ericsciple commented Oct 5, 2016

@bryanmacfarlane do you have any thoughts where the file should go? I'm guessing once we choose a location, we need to leave it there.

This is nice.

@ericsciple

This comment has been minimized.

Show comment
Hide comment
@ericsciple

ericsciple Oct 27, 2016

Member

@AArnott fyi - i haven't forgotten about this one... lot going on right now, shutting down for RTM and normal 3wk sprints going on in parallel.

Member

ericsciple commented Oct 27, 2016

@AArnott fyi - i haven't forgotten about this one... lot going on right now, shutting down for RTM and normal 3wk sprints going on in parallel.

@ericsciple

This comment has been minimized.

Show comment
Hide comment
@ericsciple

ericsciple Oct 27, 2016

Member

@bryanmacfarlane are you fine with the location of this file (root of the repo)? i'm guessing once we choose a location it needs to stay there (since folks will be hardcoding a dependency to that specific url)

Member

ericsciple commented Oct 27, 2016

@bryanmacfarlane are you fine with the location of this file (root of the repo)? i'm guessing once we choose a location it needs to stay there (since folks will be hardcoding a dependency to that specific url)

@ericsciple

This comment has been minimized.

Show comment
Hide comment
@ericsciple

ericsciple Mar 23, 2017

Member

@AArnott The main concern I have is, once it is merged, then is the location sealed? Or would an fwlink work in the $schema property? Would that prevent folks from breaking if the location is changed?

Member

ericsciple commented Mar 23, 2017

@AArnott The main concern I have is, once it is merged, then is the location sealed? Or would an fwlink work in the $schema property? Would that prevent folks from breaking if the location is changed?

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott Mar 23, 2017

Member

I suspect json language services can handle HTTP redirects, but I haven't tried it. FWIW it looks like folks are already burning in a specific commit's version of this schema, so by completing the PR and updating the docs we at least get them to 'tip' of whatever you have. But assuming fwlink's work (or perhaps since this is customer visible an aka.ms link would be better) are you ok with merging this then?

Member

AArnott commented Mar 23, 2017

I suspect json language services can handle HTTP redirects, but I haven't tried it. FWIW it looks like folks are already burning in a specific commit's version of this schema, so by completing the PR and updating the docs we at least get them to 'tip' of whatever you have. But assuming fwlink's work (or perhaps since this is customer visible an aka.ms link would be better) are you ok with merging this then?

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott Mar 23, 2017

Member

OK, I just tested it. VS Code (for one) supports redirects in their JSON schema URLs. I set up https://aka.ms/vsts-tasks.schema.json and made you, @ericsciple, co-owner of it so you can update it once this PR completes.

Member

AArnott commented Mar 23, 2017

OK, I just tested it. VS Code (for one) supports redirects in their JSON schema URLs. I set up https://aka.ms/vsts-tasks.schema.json and made you, @ericsciple, co-owner of it so you can update it once this PR completes.

@ericsciple

This comment has been minimized.

Show comment
Hide comment
@ericsciple

ericsciple Mar 24, 2017

Member

OK my last concern is how do folks know they should use the aka link, and not whatever URL they happen to be browsing when they come across the schema document. It looks like json schema supports an "id" property that can be used to identify the URL of the schema document itself, e.g.

{
    "id": "https://aka.ms/vsts-tasks.schema.json"

So that addresses my last concern.

Member

ericsciple commented Mar 24, 2017

OK my last concern is how do folks know they should use the aka link, and not whatever URL they happen to be browsing when they come across the schema document. It looks like json schema supports an "id" property that can be used to identify the URL of the schema document itself, e.g.

{
    "id": "https://aka.ms/vsts-tasks.schema.json"

So that addresses my last concern.

@ericsciple

This comment has been minimized.

Show comment
Hide comment
@ericsciple

ericsciple Mar 24, 2017

Member

@bryanmacfarlane any outstanding concerns? I can add the ID at the top after merged, or whatever.

Member

ericsciple commented Mar 24, 2017

@bryanmacfarlane any outstanding concerns? I can add the ID at the top after merged, or whatever.

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott Jul 17, 2017

Member

Ping. I'm seeing random folks on github referencing this .json file from my fork. The sooner this PR gets completed (or guidance for placing it elsewhere is given), the sooner folks can reference the official location and it can be properly maintained.

Member

AArnott commented Jul 17, 2017

Ping. I'm seeing random folks on github referencing this .json file from my fork. The sooner this PR gets completed (or guidance for placing it elsewhere is given), the sooner folks can reference the official location and it can be properly maintained.

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott
Member

AArnott commented Nov 8, 2017

"type": "string",
"description": "The target file to be executed. You can use variables here in brackets e.g. $(currentDirectory)\filename.ps1"
},
"argumentFormat": {

This comment has been minimized.

@masters3d

masters3d Dec 5, 2017

Contributor

@bryanmacfarlane Is there a description for argumentFormat? I've searched but have not found what argument format is suppose to do. For most examples is just an empty string. Fox example: Can I pass arguments here?

@masters3d

masters3d Dec 5, 2017

Contributor

@bryanmacfarlane Is there a description for argumentFormat? I've searched but have not found what argument format is suppose to do. For most examples is just an empty string. Fox example: Can I pass arguments here?

This comment has been minimized.

@ericsciple

ericsciple Dec 5, 2017

Member

It is from legacy handlers and it should not be used.

@ericsciple

ericsciple Dec 5, 2017

Member

It is from legacy handlers and it should not be used.

@ericsciple ericsciple merged commit 0217b3a into Microsoft:master Jan 29, 2018

1 check passed

license/cla All CLA requirements met.
Details

@AArnott AArnott deleted the AArnott:taskJsonSchema branch Jan 29, 2018

@ILMTitan

This comment has been minimized.

Show comment
Hide comment
@ericsciple

This comment has been minimized.

Show comment
Hide comment
@ericsciple

ericsciple Jan 30, 2018

Member

thanks, will fix

Member

ericsciple commented Jan 30, 2018

thanks, will fix

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