Non localizable field shows as localized field

I have…

  • [x] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

API Documentation shows field that has localization disabled as follows
{
“fieldname”: {
“iv”: “field value”
}
}

Expected behavior

API Documentation shows field that has localization disabled as follows
{
“fieldname”: “field value”
}

Minimal reproduction of the problem

  • Setup new Squidex instance
  • Login
  • Create new app
  • Create a new schema for that app
  • Create a new string/number/whatever field for the created schema
  • Don´t select the “Localizable” option
  • Hit “Create and close”
  • Publish the schema
  • Go to API -> Content API
  • Show the “Get a {YourSchema} content.”
  • Look at the response samples

Environment

  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: latest, dev-4462 4.6.0

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [x] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

There was someone had the same problem, which you can see here: [SOLVED] Does not update 'partitioning' field in JSON schema

I wasn´t able to verify the fix deployed by Sebastian

Can you please post a screenshot or so?

image

This is normal, “Iv” stands for “invariant”.

Edit: It is described here: https://docs.squidex.io/02-documentation/concepts/localization

Edit 2: Thank you very much for the good detailed description.

I already read the complete docs for that. So the only way to archive what I want is to use the X-Flatten header ?

Cause here: https://docs.squidex.io/02-documentation/concepts/schemas it is described differently, or atleast it looks like it is archiveable.

Cause I guess when I generate a C# client from the OpenAPI specification, it will include the sub-object which is (IMHO) pretty janky

Yes, thats true, what exactly is described differently?

You can also use the SDK: https://docs.squidex.io/02-documentation/software-development-kits/.net-standard#1-create-your-class-model

API representation for string and Number for example

{
    "name": "Squidex T-Shirt",
    "description": "For our fans. <p>Available in <strong>multiple colors ..."
}

which then should be

{
    "name": {
        "iv": "Squidex T-Shirt"
    },
    "description": {
        "iv": "For our fans. <p>Available in <strong>multiple colors ..."
    }
}

Thx for the hint to the SDK