[REST API] Swager Import - Static Entity Enums & Static Entity Identifier Types

When an OpenAPI file is imported to OutSystems as a consumption REST service, it creates some objects I am unable to modify or create myself from the Studio UI.

  1. Enum static entity objects (under a REST API container under data entities)
  2. Use/change the Entity Identifier Type (from 1) under the associated REST API structures
  3. Use/change the Entity Identifier Type (from 1) under the REST API action inputs

Is this available to edit using a beta version? Or can I use an OutSystems Studio API to modify these values? It would be very useful to be able to create the same structures myself, and it's very frustrating to not be able to modify to tweak the ones created by the import wizard.

Hi Adam,

Can you post some screenshots or the OML? Can you share the API that you are importing?  What version of the platform are you using? What version of Service Studio? The more data/info that you provide will help us to give you answers faster.



Stacey Levine wrote:

What version of the platform are you using? What version of Service Studio?

OutSystems Studio 11.7.10

Server Version 11.8.0 (Build 12006)

Can you share the API that you are importing?

Technically it is the stripe openapi 3 import, but the actual api doesn't matter, I'm interested in the behaviour of the REST API import wizard and the objects it creates.

Can you post some screenshots or the OML?

Here you can see that after importing a REST API, OutSystems has created or referenced a REST API object under the Database Entities, you can also see it did the same thing for the REST API Structures:

This is used to store automatically generated Enum static entities. These static entities have 1 main attribute: Value which is both the static entity identifier field, and has a type matching the enum value, so it can be any of the basic types e.g.  text,  integer ,  boolean ,  etc. OutSystems then populates static records for each allowed enum value, an example list is seen below, highlighted example is: airlines_air_carriers = "airlines_air_carriers".

These enums are then used as a static entity identifier type on other Structures or REST API Method Parameters (below you can see Enum_allowed_categories Identifier List:

Sometimes OutSystems imports the values wrong, for example, here it has imported Enum_deleted, which has an allowed value of True, but has imported the value as a sting literal "True" which is obviously incorrect. However I am unable to remove the quotes.

Here you can see similar usage of the static entity Enum_business_type Identifier directly on REST API parameter types:

This is a very useful feature, and I would like to be able to use it for other APIs which may or may not have been imported via the wizard.

I am unable to set any new attribute types to a "Static Entity Identifier" type, and even ones that are initially set to it, if you change them to something else, like text, you cant change them back again.

Also some of them are created with odd names that I would like to be able to rename or add additional enum values to, but it is all greyed out.

I haven't been able to find any reference to this in the OutSystems documentation.

Is this capability able to be edited via some API? (obviously yes, as the wizard was able to do it)... Is there a copy of the import wizard somewhere? We could use it to maintain API definitions programatically (especially when new versions come out).

Thanks for your help with this.

I have just had the same issue for a swagger file import. Did you ever find a solution to this issue?

Hi Stacey Levine, do you have any thoughts on this?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.