Skip to content

Commit f27c94b

Browse files
authored
Merge branch 'next' into kanad-2025-09-17/more-URL-uploading-quirks
2 parents ccb807a + 6616201 commit f27c94b

File tree

26 files changed

+962
-953
lines changed

26 files changed

+962
-953
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [10.5.3-next.1](https://github.com/readmeio/rdme/compare/v10.5.2...v10.5.3-next.1) (2025-10-08)
2+
3+
4+
### Bug Fixes
5+
6+
* **openapi/upload:** restore `--working-directory` ([#1369](https://github.com/readmeio/rdme/issues/1369)) ([f8cd895](https://github.com/readmeio/rdme/commit/f8cd895d527dec83044f45d5096cfacaadc7fb86))
7+
18
## [10.5.2](https://github.com/readmeio/rdme/compare/v10.5.1...v10.5.2) (2025-09-24)
29

310

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ bin/run.js openapi validate __tests__/__fixtures__/ref-oas/petstore.json
2626

2727
Your changes to the command code may make changes to [the command reference documents](./documentation/commands) — it is up to you whether you include those changes in your PR or if you let the release process take care of it. More information on that can be found in [`MAINTAINERS.md`](./MAINTAINERS.md).
2828

29+
## ReadMe Development 🦉
30+
31+
If you're a ReadMe team member that's testing `rdme` against a non-production ReadMe environment, you can either set the `RDME_LOCALHOST=true` environment variable (which points your CLI to the localhost version of ReadMe) or modify the URLs in `src/lib/config.ts` directly.
32+
2933
## Running GitHub Actions Locally 🐳
3034

3135
To run GitHub Actions locally, we'll be using [`act`](https://github.com/nektos/act) (make sure to read their [prerequisites list](https://github.com/nektos/act#necessary-prerequisites-for-running-act) and have that ready to go before installing `act`)!

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ For local CLI usage with a single project, you can authenticate `rdme` to your R
114114
> [!WARNING]
115115
> For security reasons, we strongly recommend providing a project API key via the `--key` option in automations or CI environments (GitHub Actions, CircleCI, Travis CI, etc.). It's also recommended if you're working with multiple ReadMe projects to avoid accidentally overwriting existing data.
116116
117-
You can also pass in your API key via environmental variable. Here is the order of precedence when passing your API key into `rdme`:
117+
You can also pass in your API key via environment variable. Here is the order of precedence when passing your API key into `rdme`:
118118

119119
1. The `--key` option. If that isn't present, we look for...
120-
1. The `RDME_API_KEY` environmental variable. If that isn't present, we look for...
121-
1. The `README_API_KEY` environmental variable. If that isn't present, we look for...
120+
1. The `RDME_API_KEY` environment variable. If that isn't present, we look for...
121+
1. The `README_API_KEY` environment variable. If that isn't present, we look for...
122122
1. The API key value stored in your local configuration file (i.e., the one set via `rdme login`)
123123

124124
`rdme whoami` is also available to you to determine who is logged in, and to what project. You can clear your stored credentials with `rdme logout`.
@@ -133,7 +133,7 @@ To set this up, check out [1Password's documentation on the ReadMe shell plugin]
133133

134134
## Proxy
135135

136-
`rdme` makes API requests to the ReadMe API, which is located at [dash.readme.com](https://dash.readme.com). If you need to configure a proxy for these requests, you can do so by setting the `HTTPS_PROXY` environmental variable.
136+
`rdme` makes API requests to the ReadMe API, which is located at [dash.readme.com](https://dash.readme.com). If you need to configure a proxy for these requests, you can do so by setting the `HTTPS_PROXY` environment variable.
137137

138138
```sh
139139
export HTTPS_PROXY=https://proxy.example.com:5678

__tests__/commands/openapi/__snapshots__/validate.test.ts.snap

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
"
6666
`;
6767
68-
exports[`rdme openapi validate > GHA onboarding E2E tests > should create GHA workflow if user passes in spec via opt (including workingDirectory) 1`] = `
68+
exports[`rdme openapi validate > GHA onboarding E2E tests > should create GHA workflow if user passes in spec via opt (including working directory) 1`] = `
6969
{
7070
"result": "
7171
Your GitHub Actions workflow file has been created!
@@ -88,7 +88,7 @@ Almost done! Push your newly created file (.github/workflows/validate-test-opt-s
8888
}
8989
`;
9090
91-
exports[`rdme openapi validate > GHA onboarding E2E tests > should create GHA workflow if user passes in spec via opt (including workingDirectory) 2`] = `
91+
exports[`rdme openapi validate > GHA onboarding E2E tests > should create GHA workflow if user passes in spec via opt (including working directory) 2`] = `
9292
"# This GitHub Actions workflow was auto-generated by the \`rdme\` cli on 2022-01-01T00:00:00.000Z
9393
# You can view our full documentation here: https://docs.readme.com/docs/rdme
9494
name: ReadMe GitHub Action 🦉
@@ -111,7 +111,7 @@ jobs:
111111
- name: Run \`openapi validate\` command 🚀
112112
uses: readmeio/rdme@v7
113113
with:
114-
rdme: openapi validate petstore.json --workingDirectory=./__tests__/__fixtures__/relative-ref-oas
114+
rdme: openapi validate petstore.json --working-directory=./__tests__/__fixtures__/relative-ref-oas
115115
"
116116
`;
117117
@@ -348,6 +348,17 @@ exports[`rdme openapi validate > should discover and upload an API definition if
348348
}
349349
`;
350350
351+
exports[`rdme openapi validate > should use specified working directory (legacy flag) 1`] = `
352+
{
353+
"result": "petstore.json is a valid OpenAPI API definition!",
354+
"stderr": " › Warning: The "--workingDirectory" flag has been deprecated. Use
355+
"--working-directory" instead.
356+
- Validating the API definition located at petstore.json...
357+
",
358+
"stdout": "",
359+
}
360+
`;
361+
351362
exports[`rdme openapi validate > should use specified working directory 1`] = `
352363
{
353364
"result": "petstore.json is a valid OpenAPI API definition!",

__tests__/commands/openapi/convert.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('rdme openapi convert', () => {
5858
await expect(
5959
run([
6060
spec,
61-
'--workingDirectory',
61+
'--working-directory',
6262
require.resolve(`@readme/oas-examples/2.0/json/${spec}`).replace(spec, ''),
6363
'--out',
6464
'output.json',
@@ -79,7 +79,7 @@ describe('rdme openapi convert', () => {
7979
await expect(
8080
run([
8181
spec,
82-
'--workingDirectory',
82+
'--working-directory',
8383
require.resolve(`@readme/oas-examples/3.0/${format}/${spec}`).replace(spec, ''),
8484
]),
8585
).resolves.toMatchSnapshot();

__tests__/commands/openapi/reduce.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('rdme openapi reduce', () => {
6262
prompts.inject(['tags', ['user'], 'output.json']);
6363

6464
await expect(
65-
run(['--workingDirectory', './__tests__/__fixtures__/relative-ref-oas']),
65+
run(['--working-directory', './__tests__/__fixtures__/relative-ref-oas']),
6666
).resolves.toMatchSnapshot();
6767

6868
expect(Object.keys(reducedSpec.paths)).toStrictEqual(['/user']);
@@ -71,7 +71,7 @@ describe('rdme openapi reduce', () => {
7171
it('should reduce with no prompts via opts', async () => {
7272
await expect(
7373
run([
74-
'--workingDirectory',
74+
'--working-directory',
7575
'./__tests__/__fixtures__/relative-ref-oas',
7676
'--tag',
7777
'user',
@@ -108,7 +108,7 @@ describe('rdme openapi reduce', () => {
108108
it('should reduce with no prompts via opts', async () => {
109109
await expect(
110110
run([
111-
'--workingDirectory',
111+
'--working-directory',
112112
'./__tests__/__fixtures__/relative-ref-oas',
113113
'--path',
114114
'/pet',
@@ -134,7 +134,7 @@ describe('rdme openapi reduce', () => {
134134

135135
await expect(
136136
run([
137-
'--workingDirectory',
137+
'--working-directory',
138138
'./__tests__/__fixtures__/relative-ref-oas',
139139
'--path',
140140
'/pet',

__tests__/commands/openapi/validate.test.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ describe('rdme openapi validate', () => {
4040
});
4141

4242
it('should discover and upload an API definition if none is provided', async () => {
43-
const result = await run(['--workingDirectory', './__tests__/__fixtures__/relative-ref-oas']);
43+
const result = await run(['--working-directory', './__tests__/__fixtures__/relative-ref-oas']);
4444
expect(result).toMatchSnapshot();
4545
});
4646

4747
it('should use specified working directory', async () => {
48+
const result = await run(['petstore.json', '--working-directory', './__tests__/__fixtures__/relative-ref-oas']);
49+
expect(result).toMatchSnapshot();
50+
});
51+
52+
it('should use specified working directory (legacy flag)', async () => {
4853
const result = await run(['petstore.json', '--workingDirectory', './__tests__/__fixtures__/relative-ref-oas']);
4954
expect(result).toMatchSnapshot();
5055
});
@@ -55,7 +60,7 @@ describe('rdme openapi validate', () => {
5560
'./__tests__/__fixtures__/nested-gitignored-oas/nest/petstore-ignored.json',
5661
);
5762

58-
const result = await run(['--workingDirectory', './__tests__/__fixtures__/nested-gitignored-oas']);
63+
const result = await run(['--working-directory', './__tests__/__fixtures__/nested-gitignored-oas']);
5964
expect(result).toMatchSnapshot();
6065
});
6166

@@ -138,13 +143,13 @@ describe('rdme openapi validate', () => {
138143
expect(fs.writeFileSync).toHaveBeenCalledWith(`.github/workflows/${fileName}.yml`, expect.any(String));
139144
});
140145

141-
it('should create GHA workflow if user passes in spec via opt (including workingDirectory)', async () => {
146+
it('should create GHA workflow if user passes in spec via opt (including working directory)', async () => {
142147
const spec = 'petstore.json';
143148
const fileName = 'validate-test-opt-spec-workdir-file';
144149
prompts.inject([true, 'validate-test-opt-spec-github-branch', fileName]);
145150

146151
await expect(
147-
run([spec, '--workingDirectory', './__tests__/__fixtures__/relative-ref-oas']),
152+
run([spec, '--working-directory', './__tests__/__fixtures__/relative-ref-oas']),
148153
).resolves.toMatchSnapshot();
149154

150155
expect(yamlOutput).toMatchSnapshot();

0 commit comments

Comments
 (0)