Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jonathdb93 opened this issue May 30, 2024 · 3 comments

Comments

@jonathdb93
Copy link

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.

Copy link

  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.

@guythetechie
Copy link
Contributor

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

@jonathdb93
Copy link
Author

jonathdb93 commented Jun 14, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants