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

[Question]: How to insert description for cases of an enum #2364

Open
mateusfmello opened this issue Oct 22, 2024 · 0 comments
Open

[Question]: How to insert description for cases of an enum #2364

mateusfmello opened this issue Oct 22, 2024 · 0 comments
Labels

Comments

@mateusfmello
Copy link

Version

v4.32.2

Question

In an Enum of type int, Swagger is only displaying the values ​​(1,2,3,4...) in the documentation, so it is not possible to know what each case is about.

I would like to be able to add a description for each case

Additional context

Enum:

<?php

namespace App\Enum;

enum TipoAnexoItemPaginaFormEnum: int implements ValidadorEnum {

	use ValidadorEnumTrait;

	case VIDEO_INTERNO = 1;
	case VIDEO_YOUTUBE = 2;
	case VIDEO_VIEMO   = 3;

	case IMAGEM = 4;
	case IFRAME = 5;
	case MAPA   = 6;
}

Result:
image

I would like a result like this:

TipoAnexoItemPaginaFormEnum integer
Enum:

[
	VIDEO_INTERNO = 1,
	VIDEO_YOUTUBE = 2,
	VIDEO_VIEMO = 3,

	IMAGEM = 4,
	IFRAME = 5,
	MAPA = 6,
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant