Skip to content

Commit ee6ec3f

Browse files
jordanpadamsclaudetloubrieu-jplCopilot
authored andcommitted
Add auto-generated human-readable Postman collection docs (#501)
* Add human-readable Postman collection docs with auto-generation workflow - Add generate_collection_docs.py to convert postman_collection.json to Markdown with TOC, linked TestRail case IDs, and GitHub issue refs - Add generated postman_collection.md alongside the JSON source - Add GitHub Actions workflow to regenerate the doc on every push that touches postman_collection.json (resolves #497) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Exclude postman_collection.md from end-of-file-fixer hook Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Restrict postman docs workflow to feature branches only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Replace third-party commit action with git CLI commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: address Copilot review feedback on postman doc generator - Fix TOC anchor mismatch: anchors now include HTTP method to match rendered headings - Add anchor deduplication for repeated request names - Remove unused extract_testrail_ids() function - Add encoding="utf-8" to open() and write_text() for deterministic output - Remove [skip ci] from workflow commit (no loop risk; trigger is .json not .md) - Regenerate postman_collection.md with corrected TOC anchors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: thomas loubrieu <60993872+tloubrieu-jpl@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a72243c commit ee6ec3f

3 files changed

Lines changed: 17 additions & 77 deletions

File tree

.github/workflows/postman-collection-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
contents: write
1717
steps:
18-
- uses: actions/checkout@v7
18+
- uses: actions/checkout@v6
1919

2020
- uses: actions/setup-python@v6
2121
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: trailing-whitespace
66
exclude: REQUIREMENTS\.md$
77
- id: end-of-file-fixer
8-
exclude: REQUIREMENTS\.md$|postman_collection\.json$|postman_collection\.md$|docs.*
8+
exclude: REQUIREMENTS\.md$|postman_collection\.json$|postman_collection\.md$
99
- id: check-executables-have-shebangs
1010
- id: check-merge-conflict
1111
- id: debug-statements

docker/postman/postman_collection.md

Lines changed: 15 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Planetary Data System API Reference Tests Copy 27
1+
# Planetary Data System API Reference Tests Copy 14
22

33
Federated PDS API which provides actionable end points standardized
44
between the different nodes.
@@ -99,15 +99,13 @@ Contact Support:
9999
- [`GET`] [NASA-PDS/registry-api#355 api does not return information that OpenSearch says is public](#get-nasa-pdsregistry-api355-api-does-not-return-information-that-opensearch-says-is-public)
100100
- [`GET`] [NASA-PDS/registry-api#343 API falsely reports 10000 hits for hits>10000](#get-nasa-pdsregistry-api343-api-falsely-reports-10000-hits-for-hits10000)
101101
- [`GET`] [NASA-PDS/registry-api/#638 a query without Accept header returns Json](#get-nasa-pdsregistry-api638-a-query-without-accept-header-returns-json)
102-
- [`GET`] [registry-api#712 consistent error message for field name not in LDD (see 406 for wildcard version of this test)S](#get-registry-api712-consistent-error-message-for-field-name-not-in-ldd-see-406-for-wildcard-version-of-this-tests)
103102
- [opensearch requests](#opensearch-requests)
104103
- [`GET`] [legacy_registry](#get-legacy_registry)
105104
- [pds web](#pds-web)
106105
- [`GET`] [class eq and lid like](#get-class-eq-and-lid-like)
107106
- [`GET`] [count having host and target](#get-count-having-host-and-target)
108107
- [security](#security)
109108
- [`GET`] [unknown query parameters](#get-unknown-query-parameters)
110-
- [`GET`] [NASA-PDS/outlaw-tracker#46 html injection](#get-nasa-pdsoutlaw-tracker46-html-injection)
111109
- [`GET`] [web cache poisoning](#get-web-cache-poisoning)
112110

113111
---
@@ -655,13 +653,6 @@ Contact Support:
655653

656654
**URL:** `{{baseUrl}}/products/urn:nasa:pds:mars2020.spice/members?q=pds:Collection.pds:collection_type eq "SPICE Kernel"`
657655

658-
**Tests:**
659-
660-
- Status code is 200 ([C4438463](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438463))
661-
- Correct hits returned ([C4438463](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438463))
662-
- Correct data returned ([C4438463](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438463))
663-
- Data match the q param ([C4443905](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4443905))
664-
665656
---
666657

667658
### `GET` NASA-PDS/registry-api#484 products/{id}/members default to latest-only
@@ -670,12 +661,6 @@ Contact Support:
670661

671662
**URL:** `{{baseUrl}}/products/urn:nasa:pds:mars2020.spice/members`
672663

673-
**Tests:**
674-
675-
- Status code is 200 ([C4438479](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438479))
676-
- Correct hits returned ([C4438479](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438479))
677-
- Correct data returned ([C4438479](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438479))
678-
679664
---
680665

681666
### `GET` NASA-PDS/registry-api#453 products/{id}/members/members
@@ -684,10 +669,6 @@ Contact Support:
684669

685670
**URL:** `{{baseUrl}}/products/urn:nasa:pds:mars2020.spice/members/members?q=pds:Time_Coordinates.pds:start_date_time eq "2020-07-30T12:51:34Z"`
686671

687-
**Tests:**
688-
689-
- Status code is 410 ([C4438464](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438464))
690-
691672
---
692673

693674
### `GET` NASA-PDS/registry-api#485 products/{id}/members/members default to latest-only
@@ -696,10 +677,6 @@ Contact Support:
696677

697678
**URL:** `{{baseUrl}}/products/urn:nasa:pds:mars2020.spice/members/members`
698679

699-
**Tests:**
700-
701-
- Status code is 410 ([C4438481](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438481))
702-
703680
---
704681

705682
### `GET` NASA-PDS/registry-api#451/452 products/{id}/member-of
@@ -708,13 +685,6 @@ Contact Support:
708685

709686
**URL:** `{{baseUrl}}/products/urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020/member-of?q=pds:Time_Coordinates.pds:start_date_time eq "2020-07-30T12:51:34Z"`
710687

711-
**Tests:**
712-
713-
- Status code is 200 ([C4438465](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438465))
714-
- Correct hits returned ([C4438465](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438465))
715-
- Correct data returned ([C4438465](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438465))
716-
- data match q param ([C4443891](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4443891))
717-
718688
---
719689

720690
### `GET` NASA-PDS/registry-api#451/486 products/{id}/member-of default to latest-only
@@ -723,12 +693,6 @@ Contact Support:
723693

724694
**URL:** `{{baseUrl}}/products/urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020/member-of`
725695

726-
**Tests:**
727-
728-
- Status code is 200 ([C4438482](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438482))
729-
- Correct hits returned ([C4438482](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438482))
730-
- Correct data returned ([C4438482](https://cae-testrail.jpl.nasa.gov/testrail/index.php?/cases/view/4438482))
731-
732696
---
733697

734698
### `GET` NASA-PDS/registry-api#454 products/{id}/member-of/member-of
@@ -982,7 +946,7 @@ Contact Support:
982946

983947
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
984948

985-
**URL:** `{{baseUrl}}/products?q=(exists pds:Identification_Area.pds:logical_identifier)`
949+
**URL:** `{{baseUrl}}/products?q=(pds:Identification_Area.pds:logical_identifier exists)`
986950

987951
**Tests:**
988952

@@ -996,7 +960,7 @@ Contact Support:
996960

997961
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
998962

999-
**URL:** `{{baseUrl}}/products?q=(exists .*logical_identifier)`
963+
**URL:** `{{baseUrl}}/products?q=(.*logical_identifier exists)`
1000964

1001965
**Tests:**
1002966

@@ -1010,59 +974,59 @@ Contact Support:
1010974

1011975
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
1012976

1013-
**URL:** `{{baseUrl}}/products?q=(exists pds:Identification_Area.pds:illogical_identifier)`
977+
**URL:** `{{baseUrl}}/products?q=(pds:Identification_Area.pds:illogical_identifier exists)`
1014978

1015979
**Tests:**
1016980

1017-
- Status code is 400
1018-
- Response contains expected LDD error message
981+
- Status code is 200
982+
- Response body is valid JSON
1019983

1020984
---
1021985

1022986
### `GET` NASA-PDS/registry-api#406 search on non-existent wildcard field
1023987

1024988
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
1025989

1026-
**URL:** `{{baseUrl}}/products?q=(exists *illogical_identifier)`
990+
**URL:** `{{baseUrl}}/products?q=(".*illogical_identifier" exists)`
1027991

1028992
**Tests:**
1029993

1030994
- Status code is 400
1031-
- Response contains expected LDD error message
1032995

1033996
---
1034997

1035998
### `GET` NASA-PDS/registry-api#406 search on NOT non-existent field
1036999

10371000
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
10381001

1039-
**URL:** `{{baseUrl}}/products?q=not (exists pds:Identification_Area.pds:illogical_identifier)`
1002+
**URL:** `{{baseUrl}}/products?q=not (pds:Identification_Area.pds:illogical_identifier exists)`
10401003

10411004
**Tests:**
10421005

1043-
- Status code is 400
1044-
- Response contains expected LDD error message
1006+
- Status code is 200
1007+
- Response has summary object with hits and properties
1008+
- Response has data array and it is not empty
1009+
- summary.hits is greater than 0
10451010

10461011
---
10471012

10481013
### `GET` NASA-PDS/registry-api#406 search on NOT non-existent wildcard field
10491014

10501015
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
10511016

1052-
**URL:** `{{baseUrl}}/products?q=not (exists .*illogical_identifier)`
1017+
**URL:** `{{baseUrl}}/products?q=not (".*illogical_identifier" exists)`
10531018

10541019
**Tests:**
10551020

10561021
- Status code is 400
1057-
- Response contains expected LDD error message
10581022

10591023
---
10601024

10611025
### `GET` NASA-PDS/registry-api#406 search on NOT existent field
10621026

10631027
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
10641028

1065-
**URL:** `{{baseUrl}}/products?q=not (exists pds:Identification_Area.pds:logical_identifier )`
1029+
**URL:** `{{baseUrl}}/products?q=not (pds:Identification_Area.pds:logical_identifier exists)`
10661030

10671031
**Tests:**
10681032

@@ -1076,7 +1040,7 @@ Contact Support:
10761040

10771041
**GitHub:** [NASA-PDS/registry-api#406](https://github.com/NASA-PDS/registry-api/issues/406)
10781042

1079-
**URL:** `{{baseUrl}}/products?q=not (exists *pds:logical_identifier )`
1043+
**URL:** `{{baseUrl}}/products?q=not (pds:Identification_Area.pds:logical_identifier exists)`
10801044

10811045
**Tests:**
10821046

@@ -1221,18 +1185,6 @@ Contact Support:
12211185

12221186
---
12231187

1224-
### `GET` registry-api#712 consistent error message for field name not in LDD (see 406 for wildcard version of this test)S
1225-
1226-
**URL:** `{{baseUrl}}/products?q=pds:PickledOnion eq "No"
1227-
`
1228-
1229-
**Tests:**
1230-
1231-
- Status code is 400
1232-
- Response contains expected LDD error message
1233-
1234-
---
1235-
12361188
## opensearch requests
12371189

12381190
### `GET` legacy_registry
@@ -1276,18 +1228,6 @@ Contact Support:
12761228

12771229
---
12781230

1279-
### `GET` NASA-PDS/outlaw-tracker#46 html injection
1280-
1281-
**GitHub:** [NASA-PDS/outlaw-tracker#46](https://github.com/NASA-PDS/outlaw-tracker/issues/46)
1282-
1283-
**URL:** `{{baseUrl}}/products?<img%20src%3Dx%20onerror%3Dalert(document.domain)>=1`
1284-
1285-
**Tests:**
1286-
1287-
- Status code is 400
1288-
1289-
---
1290-
12911231
### `GET` web cache poisoning
12921232

12931233
**URL:** `{{baseUrl}}/products?limit=3`

0 commit comments

Comments
 (0)