Skip to content

Unexpected "id", "type", "name" in extraction files #340

Open

Description

@proddagmc

Question

From here: https://github.com/Azure/apiops-cli/blob/main/docs/reference/artifact-format.md

APIM-managed fields (like id, type, name) are not stored — they're reconstructed at publish time

Can you explain why the JSON files created by extraction have "id", "type", "name" in them? "type" and "name" are unnecessary, and "id" is environment specific. An example from a named value file namedValueInformation.json:

{ "id": "/subscriptions/d0d2d3bd-2eca-495a-b5a3-c510c051b66a/resourceGroups/rg-ourservices-dev-001/providers/Microsoft.ApiManagement/service/apim001/namedValues/My-Centre-Subscription-Rate-Limit-Calls", "type": "Microsoft.ApiManagement/service/namedValues", "name": "My-Centre-Subscription-Rate-Limit-Calls", "properties": { "displayName": "My-Centre-Subscription-Rate-Limit-Calls", "value": "10", "tags": [ "my-centre-tag" ], "secret": false } }

I would expect id, name and type to be absent like so:

{ "properties": { "displayName": "My-Centre-Subscription-Rate-Limit-Calls", "value": "10", "tags": [ "my-centre-tag" ], "secret": false } }

Am I missing something, is there a way I can exclude these properties? They're everywhere, I don't want the noise nor do I want to have to include them in our override files.

Thanks!

Context

Using v1.0.5

PS> apiops extract --resource-group rg-ourservices-dev-001 `
>> --service-name apim001 `
>> --output .\extract `
>> --subscription-id d0d2d3bd-2eca-495a-b5a3-c510c051b66a `
>> --format json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionQuestions about usage or behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions