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

Implement automated reference documentation generation #20

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

Conversation

Marton6
Copy link
Member

@Marton6 Marton6 commented Mar 15, 2024

This PR sets up the npm run gen-docs script which can be used to automatically generate markdown reference docs based on the doc comments in the SDK's code.

@Marton6 Marton6 requested a review from libutcher March 19, 2024 09:35
docs/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@libutcher libutcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just left two small comments. Overall I think these are well formatted and easy to follow, and the relative linking works well. Like I mentioned in my other comment, Erin brought to my attention that we unfortunately can't use GitHub Pages for commercial use, so that complicates things here. I think even if we were to copy and paste the files generated in this MR into the developer portal, though, that would work reasonably well as a last resort. Thank you so much for getting this working!

docs/classes/client.Client.md Show resolved Hide resolved
@Marton6
Copy link
Member Author

Marton6 commented Apr 3, 2024

Let's not manually edit the reference docs just yet. I will look into maybe choosing a better docs generator two weeks from now but for now this is good enough, I think.

@@ -1,19 +1,41 @@
/**
Module defining the Secrets API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be late to this, but I just caught that some of these module descriptions don't appear on the .md files. Then, after digging further, I didn't find these code comments on main. Do you know where these are being sourced from? I'd like to edit them and also make sure they're consistently appearing in the markdown versions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now they are not sourced from anywhere, so they can be edited in-place here.

Copy link
Contributor

@libutcher libutcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few small edits on the new documentation in the .ts files. Sorry for missing that this was new content earlier!

@@ -1,3 +1,7 @@
/**
Module containing the 1Password SDK Client, which can be used to authenticate and access data stored in 1Password programmatically.
Copy link
Contributor

@libutcher libutcher Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Module containing the 1Password SDK Client, which can be used to authenticate and access data stored in 1Password programmatically.
Module containing the 1Password SDK client, which can be used to authenticate and access data stored in 1Password programmatically.

I don't think we need to capitalize "client" in this context, since the client isn't a separate product.

import * as os from "os";
import { ClientAuthConfig } from "./core.js";

const LANGUAGE = "JS";
const VERSION = "0010001"; // v0.1.0

// Contains information necessary to configure an SDK client.
/**
Defines all parameters that can be used to configure the 1Password SDK Client.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Defines all parameters that can be used to configure the 1Password SDK Client.
Defines all parameters that can be used to configure the 1Password SDK client.

@@ -1,6 +1,13 @@
/**
Internal module defining the 1Password SDK Core. Users of the SDK should import and use the `client` module instead of this one.
Copy link
Contributor

@libutcher libutcher Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Internal module defining the 1Password SDK Core. Users of the SDK should import and use the `client` module instead of this one.
Internal module defining the 1Password SDK core. You should import and use the `client` module instead of this one.

/**
Module defining the Secrets API.
The Secrets API can be used to access secrets stored in 1Password via secret references (op://vault/item/field).
It is implemented by the 1Passwor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we trying to say with the third line here?

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.

3 participants