Azure / Azure/apiops

[BUG] API not present in configuration file is still being deployed

Open
#659 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
448
Forks
247
PR merge metrics
No merged PRs in 30d

Description

### Release version

v6.0.11

### Describe the bug

As per documentation and #435, I was told that I should be able to prevent the deployment of an API by omitting the API from the configuration file.

However, this does not appear to work as I have an API currently commented in configuration code:

```yaml
[...]
apis:
[...]
# - name: api2
# properties:
# serviceUrl: ""
# there is no dev env
```

but the API is being deployed whether I make a publish all artifacts or edit the specs and publish last commit...
I always deploy with configuration file as I have multiple environment, I am using different configuration files for each environment

### Expected behavior

Only API defined explicitly in the configuration files are published. API that are commented should not be published.

### Actual behavior

All API are deployed, all the time.

### Reproduction Steps

configuration file `configuration.d1.yaml`:

```yaml
---
apimServiceName: apimdev01
apis:
#APIs Begin
- name: api1
properties:
serviceUrl: "https://api1.example.net"
# - name: api2
# properties:
# serviceUrl: ""
# there is no dev env
```

folder structure:
- apis
- api1
- apiInformation.json
- specification.json
- api2
- apiInformation.json
- specification.json

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.