apiops icon indicating copy to clipboard operation
apiops copied to clipboard

[BUG] Publisher adding characters when API specification contains ° or ³

Open jonathdb93 opened this issue 1 year ago • 3 comments

Release version

APIOps Toolkit for Azure APIM v5.1.4

Describe the bug

When publishing an API specification that contains ° or ³, the final result of our schema definitions contains °C instead of °C and ³ instead of ³.

Our specification.yaml file contains the following lines:

components:
  schemas:
    Conditions:
      type: object
      properties:
        temperature:
          type: number
          description: Temperature (°C)
        gasContent:
          type: number
          description: Content of gas (mg/Nm³)
      description: Conditions

which results in a definition in APIM with schema:

{
    "type": "object",
    "properties": {
        "temperature": {
            "type": "number",
            "description": "Temperature (°C)"
        },
        "gasContent": {
            "type": "number",
            "description": "Content of gas (mg/Nm³)"
        }
    },
    "description": "Conditions"
}

Expected behavior

When providing a specification that contains ° or ³, the schema published in API Management contains ° and ³ without any additional characters.

Actual behavior

When providing a specification that contains ° or ³, the schema published in API Management contains ° and ³.

Reproduction Steps

Publish an API specification with a schema that contains a special character such as ° or 3.

jonathdb93 avatar May 30 '24 18:05 jonathdb93

  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.

github-actions[bot] avatar May 30 '24 18:05 github-actions[bot]

@jonathdb93 - if you import your specification file manually into APIM through the Azure portal, does it work as expected?

guythetechie avatar Jun 10 '24 14:06 guythetechie

@jonathdb93 - if you import your specification file manually into APIM through the Azure portal, does it work as expected?

@guythetechie I've manually imported the extracted file back into APIM and did not get any special characters in my API definition. This indeed works as expected.

jonathdb93 avatar Jun 14 '24 12:06 jonathdb93