wso2 / wso2/mi-vscode

The Service Designer view displays an error for a specific API source format

Open
#1,237 1 comment 0 reactions 1 assignee View on GitHub

@RasiBoi is already working on this.

Since Oct 22, 2025.

Credits/30 Hacktoberfest Type/Bug
Dominant language
TypeScript
Stars
10
Forks
22
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Description

The Service Designer view may or may not display an error, depending on the format of the API source XML.

If I add the following API to the VSCode extension:

<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://ws.apache.org/ns/synapse" context="/samples/artifacts" name="sampleArtifacts_v1_sample_api" version="v1" version-type="url">
	<resource methods="GET" uri-template="/xslt" inSequence="sampleArtifacts_v1_xslt_inSeq" faultSequence="sampleArtifacts_v1_generic_faultSeq"/>
	<resource methods="POST" uri-template="/connector" inSequence="sampleArtifacts_v1_connector_inSeq" faultSequence="sampleArtifacts_v1_generic_faultSeq"/>
	<resource methods="GET" uri-template="/secret" inSequence="sampleArtifacts_v1_secret_inSeq" faultSequence="sampleArtifacts_v1_generic_faultSeq"/>
	<resource methods="POST" uri-template="/ms-mp" inSequence="sampleArtifacts_v1_msMp_inSeq" faultSequence="sampleArtifacts_v1_generic_faultSeq"/>
</api>

I get the following error in the Service Designer view:

Image

I decided to create it from scratch using the VSCode Extension, it works:

Image

The difference is in how the resources are defined in the XML. This works <resource ...></resource> but fails <resource .../>. Why does the latter fail? Both are equivalent XML and work fine when deployed in the Micro Integrator.

Could this issue be fixed so that it accepts both formats?

Steps to Reproduce

Just try adding an API that has at least one resource with the format <resource .../>.

Version

2.4.1

Environment Details (with versions)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.