microsoft / microsoft/typespec

Xml Default Namespace

Open
#2,993 0 comments 0 reactions 0 assignees View on GitHub
design:needed triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

As part of xml basic design #2970 we don't support default `xmlns`. This can be quite problematic so moving into a different issue

```xml

abc
abc

```

Here:

- `Book` belongs to `https://example.com/ns1`
- `id` belongs to `https://example.com/ns2`
- `name` belongs to `https://example.com/ns1`

```tsp

@defaultNamespace("https://geo-json.com")
namespace GeoJson {
model Point {
x: string;
y: string;
}
}

@defaultNamespace("https://my-service.com")
namespace MyService {
model Foo {
loc: GeoJson.Point;
myLoc: MyPoint;
}

model MyPoint {
...GeoJson.Point;
}
}
```

```xml


1
1


1
1

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.