Blog Post

Educator Developer Blog
3 MIN READ

Part 1 - Develop a VS Code Extension for Your Capstone Project

drpeteryau's avatar
drpeteryau
Copper Contributor
May 07, 2025

API Guardian - My Capstone Project

As software and APIs evolve, developers encounter significant difficulties in maintaining and updating API endpoints. Breaking changes can lead to system instability, while outdated or unclear documentation makes maintenance less efficient.

These challenges are further compounded by the time-consuming nature of updating dependencies and the tendency to prioritize new features over maintenance tasks. The absence of effective tools and processes to tackle these issues reduces overall productivity and developer efficiency.

To address this, API Guardian was created as a Visual Studio Code extension that identifies API endpoints in a project and checks their functionality before deployment. This solution was developed to help developers save time spent fixing issues caused by breaking or non-breaking changes and to alleviate the difficulties in performing maintenance due to unclear or outdated documentation.

 

Features and Capabilities

This extension has 3 main features:

Feature 1. Developers can decide if the extension will scan or skip specified files in the project.

    • Press “Enter” to scan/skip all files.
    • Type the file name (e.g., main.py) and press “Enter” to scan/skip a single file.
    • Type file names with a delimiter (e.g., main.py | pythonFile.py) and press “Enter” to scan/skip multiple files.
Decide which file(s) perform an API health status scans

Feature 2. Custom hover messages when developers mouse over identified APIs

This hover message will vary based on the status of the APIs. If the API returns a success status, the hover message will only show the completed API and its status.

Sample response regards the API health check (brief)Sample response regards the API health check (detail)

However, if an error occurs, the hover message will include this additional information: (1) API Name, (2) Official API Link, (3) Error Message, (4) Title of Recommended Fix and (5) Link to the Recommended Fix.

Feature 3. Excel Report with Details of Identified APIs

After all the identified APIs have been tested, an excel report will exported with the following information to allow developers to easily identify the APIs in the project.

Report generated in MS Excel format

What Technology and Products does it involved?

Building a Visual Studio Code extension and publishing it to the Visual Studio Marketplace involves a mix of technologies and tools. The project was initiated using the NPM package, generator-code, to set up a JavaScript project for developing the extension. All the extension's logic will be developed and managed within the "extension.js" file generated during the setup process. Once ready for deployment, we will package the extension using "vsce" to generate a ".vsix" file, which will then be used for deployment to the Visual Studio Code Marketplace.

The deployment process involves requiring the user to create a publishing account and using tools like vsce to upload and manage the extension's version, updates, and metadata. As part of this process, you would need to create a Personal Access Token (PAT) from Azure DevOps. This token is used to verify your identity and authenticate the publishing tool, allowing you to securely upload your extension to the Visual Studio Marketplace. The PAT provides the necessary permissions for tasks such as version management, publishing new releases, and updating the extension metadata.

 

What did I learn?

Throughout this journey, I learned not just about the technical stack but also about the value of detailed project setup and secure publishing processes. While the technical steps can be challenging, they’re incredibly rewarding, and I’m excited to dive deeper into it moving forward.

I’m looking forward to exploring how the extension can be further improved and enhanced. If you're interested in learning more about how my API guidance was built, keep an eye out for my next post!

 

API Guardian

https://marketplace.visualstudio.com/items?itemName=APIGuardian-vsc.api 

 

About the Authors

Main Author - Ms Joy Cheng Yee Shing, BSc (Hon) Computing Science

Academic Supervisor - Dr Peter Yau, Microsoft MVP

Group photo from the Glasgow research team: Dr Peter Yau (left), Ms Joy Cheng (middle), and A/Prof Lawrence Seow (right)
Updated May 02, 2025
Version 1.0
No CommentsBe the first to comment