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

[v6] Generate useful README files #594

Closed
1 task
joheredi opened this issue Mar 23, 2020 · 9 comments
Closed
1 task

[v6] Generate useful README files #594

joheredi opened this issue Mar 23, 2020 · 9 comments
Assignees
Milestone

Comments

@joheredi
Copy link
Member

joheredi commented Mar 23, 2020

Auto generate useful Readme files with code samples in Typescript that demonstrates the use of the generated SDK.

We need to make sure generated samples are valid and can be run. Previous Autorest.Typescript had some issues generating invalid samples, see #576

  • Samples should be generated in Javascript instead of Typescript to help portability
@joheredi joheredi changed the title [v6] Generate code samples in README files [v6] Generate useful README files Jul 7, 2020
@joheredi joheredi added this to the Backlog milestone Jul 13, 2020
@joheredi
Copy link
Member Author

joheredi commented Oct 8, 2020

We should consider looking into #455, #296, #369, #700 when working on the samples for v6

@joheredi
Copy link
Member Author

None of the languages are currently generating heavy readmes here's what the other languages do right now:

Python: Readme with general information about Azure Management, nothing specific about the generated library.
Java: no README
C#: no README

I have started a conversation with the Autorest crew to see if we can reach agreement on consistent Readmes across languages.

I would propose we generate a README with the following information:

Service Description: From the swagger
Supported platforms: Which node and browser versions are supported
How to install the package: npm install @azure/arm-resource-manager

I'm reluctant about generating samples, usually samples are hand-picked and carefully crafted to describe a set of steps that are meaningful for each service. For example a service may be interested to show the following hero scenario 1. authenticate 2. create and entity 3. poll the creation operation until completed 4. list all the entities where another service may have a very different flow.

If we want to provide samples, I think Python's approach is reasonable, where they point users to https://github.com/Azure-Samples/azure-samples-python-management

Python sample README: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/containerservice/azure-mgmt-containerservice/README.md

/cc: @lmazuel, @sarangan12

@qiaozha
Copy link
Member

qiaozha commented Mar 15, 2021

Maybe we could at least provide one simple example for customers just like track1 mgmt. SDK? Otherwise it may cause user's confusion on how to use the track2 SDK once we publish it. @nickzhums How do you think of it?
Actually, we also have sample repo for JS mgmt. SDK https://github.com/Azure-Samples/azure-samples-js-management. we can consider to point to this sample repo, but we will only add some samples for ring0 RP due to lack of resources.
cc @lirenhe

@nickzhums
Copy link

it will be great if we can show how to authenticate and make a simple request in README for Track 2 package (this is what track 1 package currently has, so would be a bummer if we don't continue it in track 2)

@sarangan12
Copy link
Member

@qiaozha As discussed in our meeting, I discussed the link idea with the rest of the autorest crew. The general consensus was that the samples link should be pointing towards the samples repository.

@qiaozha
Copy link
Member

qiaozha commented Apr 20, 2021

If that's the case, Could you point the sample link of mgmt. plane SDK to https://github.com/Azure-Samples/azure-samples-js-management this repo. Thanks

@ramya-rao-a
Copy link
Contributor

@sarangan12 Would the link be passed via a flag to the auto rest command?

@sarangan12
Copy link
Member

@deyaaeldeen Can you update this issue with the current status? Last week, there were several changes that went into the readme file. Can you please confirm if that resolves this issue?

@deyaaeldeen
Copy link
Member

code complete with #971

Here is an example

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

Successfully merging a pull request may close this issue.

6 participants