question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] API Software Catalog: Upgrade Catalog Processors to handle API Specs referenced in multiple files with $ref

See original GitHub issue

Status: Open for comments

Need

Current support for Kind: API in Software Catalog is limited to a standalone API Specification file either mentioned completely inline the Catalog definition or referenced in URL with $yaml / $json / $text

It’s a standard practice to write API specifications in multiple files and references them with $ref in the spec files.

While doing a Proof of Concept with three use-cases which are discussed within the Backstage Discord server, it is concluded that the best solution would be to upgrade the Catalog processors to handle this problem.

Sample Error Message we got by doing a $ref to a file present on relative path to the registered catalog file is attached below:

Screenshot 2021-08-11 at 5 36 24 PM

Proposal

The catalog processor can be modified to create a standalone specification in the backend by combining all the $ref references (to a file reference with a path on the VCS or a URL from a host which is in the reading list of Backstage applications). This standalone specification within a catalog definition can be then registered on the Backstage UI successfully.

Alternatives

We are adopting Backstage and would love to see all our APIs on the platform.

If we go with the current product, we would have to spend time and change all our API specifications into a standalone file.

Risks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:15
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
datagitliescommented, Aug 27, 2021

My .02 - provide an option to pass configuration (such as “The URL pointing to API definition”) to the embedded swagger-ui and let it do it’s thing (including following any $ref values). I’m not understanding why “copies” of the definition need to be created anywhere for this use-case. swagger-ui is really good at loading remote OAS definitions via a URL. Of course, there are CORS implications to doing this but it’s not too high of a hurdle for most users. This would also open the door to providing the embedded swagger-ui a configUrl - which would also be nice.

2reactions
NishkarshRajcommented, Feb 24, 2022

@satrox28 @dtuite @lorsatti Please re-assign this RFC to someone else. We do require this feature but our team is focusing on other things. I apologize for leaving this hanging.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Catalog Management API | IBM Cloud API Docs
With the catalog management service, you can define the way users in your account can interact with the IBM Cloud® catalog and the...
Read more >
Descriptor Format of Catalog Entities - Backstage.io
Documentation on Descriptor Format of Catalog Entities which describes the default data shape and semantics of catalog entities.
Read more >
REST API reference - Product Documentation | ServiceNow
The Product Catalog Open API provides endpoints to create and retrieve product catalogs, product offerings, and product specifications.
Read more >
Apache HBase ™ Reference Guide
In a distributed configuration, the cluster contains multiple nodes, each of which runs one or more HBase daemon. These include primary and backup...
Read more >
Agents - Configuration File Reference | Consul
You can create one or more files to configure the Consul agent on startup. We recommend grouping similar configurations into separate files, such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found