[Bug]: API page not getting published if it contains a field of type Enum that has the same Name as another API Page that holds this as EntityName
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
Problem description
If you have an EntityName on an API page (within the same APIGroup) that matches a field of type Enum on another page, then that page on which the Enum field is located will not be published.
Below is a screenshot of 2 pages in that same repo from standard BC tables (find code in the public repo louagej/apicase).
When you publish page 62001 with EntityName itemTypes, Page 62002 jobItems is no longer available as an API page.
When you publish page 62001 with EntityName itemVariant, Page 62002 jobItems is available again as an API page.
When you publish page 62001 with EntityName itemTypes and APIGroup mySecondGroup, Page 62002 jobItems is also available as an API page.
Expected behavior
The API Page should be published, even in the same API Group
Steps to reproduce
You can find code in the public repo louagej/apicase.
Publish the app to a BC environment and test the API endpoints
Additional context
No response
Internal work item: AB#625882
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked louagej/apicase reproduction, publish the app to a Business Central environment, and test the API endpoints for pages 62001 and 62002. Compare the itemTypes EntityName in the same APIGroup with the itemVariant and separate-group cases; done means page 62002 remains available as an API page in the same group.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100