Skip to content

Commit

Permalink
CMR-10210: content type is text/yaml in the response
Browse files Browse the repository at this point in the history
CMR-10210: Fix Documentation reference

CMR-10210: Fix unit test
  • Loading branch information
eudoroolivares2016 committed Dec 4, 2024
1 parent 840475f commit 4af2de4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/providerCatalog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe("GET /:provider", () => {

const link: Link = catalog.links.find((l: Link) => l.rel === "service-desc");
expect(link).to.have.property("rel", "service-desc");
expect(link).to.have.property("type", "application/vnd.oai.openapi;version=3.0");
expect(link).to.have.property("type", "text/yaml");
expect(link).to.have.property("href", "https://api.stacspec.org/v1.0.0-beta.1/openapi.yaml");
expect(link).to.have.property("title", "OpenAPI Doc");
});
Expand Down
2 changes: 1 addition & 1 deletion src/domains/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const extractLicense = (_collection: Collection) => {
};

/**
* Examing a collections related URLs to see if it contains a reference to a STAC catalog.
* Examining a collections related URLs to see if it contains a reference to a STAC catalog.
* If the collection has a RelatedURL of type: "GET CAPABILITIES",
* and subtype: "STAC" then that URL should be placed in the href for the items link.
*
Expand Down
2 changes: 1 addition & 1 deletion src/routes/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const generateSelfLinks = (req: Request, nextCursor?: string | null, count?: num
{
rel: "service-desc",
href: "https://api.stacspec.org/v1.0.0-beta.1/openapi.yaml",
type: "application/vnd.oai.openapi;version=3.0",
type: "text/yaml",
title: "OpenAPI Doc",
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/routes/rootCatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const selfLinks = (req: Request): Link[] => {
{
rel: "service-desc",
href: `https://api.stacspec.org/v1.0.0-beta.1/openapi.yaml`,
title: "OpenAI Documentation",
type: "application/vnd.oai.openapi;version=3.0",
title: "OpenAPI Documentation",
type: "text/yaml",
},
{
rel: "service-doc",
Expand Down

0 comments on commit 4af2de4

Please sign in to comment.