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

Esquema Swagger inválido #308

Open
gabrielmcf opened this issue Nov 4, 2020 · 1 comment
Open

Esquema Swagger inválido #308

gabrielmcf opened this issue Nov 4, 2020 · 1 comment

Comments

@gabrielmcf
Copy link

Tentei gerar um cliente java usando o esquema swagger do Catalog API porém ele é inválido, segundo o Swagger Editor. Mesmo gerando o cliente com o ignore-spec ele fica com vários objetos de retorno e envio com nomes de Example e Request, criando um código muito porco. Se é o esquema oficial das APIs da Vtex poderia pelo menos seguir de verdade o padrão OpenAPI 3. @karenkrieger @brunoamui @JulianaMeyerArruda @brenobarreto @georgebrindeiro @garrucho

@gabrielmcf
Copy link
Author

gabrielmcf commented Nov 9, 2020

Usei o seguinte comando:

docker-entrypoint.sh generate \
    -c ./vtex-catalog-api-config.json \
    -i ./vtex-catalog-api.json \
    -g java \
    -o ./build-client \
    -t ./src/main/resources/templates/Java \
    --skip-validate-spec

O arquivo vtex-catalog-api-config.json era:

{
  "modelPackage": "br.com.vtexcatalogapi.model",
  "apiPackage": "br.com.vtexcatalogapi.api",
  "invokerPackage": "br.com.vtexcatalogapi",
  "groupId": "br.com",
  "artifactId": "VtexCatalogApi",
  "artifactVersion": "0.0.1",
  "library": "jersey2",
  "hideGenerationTimestamp": true,
  "useRuntimeException": true,
  "fullJavaUtil": true,
  "modelPropertyNaming": "original",
  "typeMappings": {
    "number": "java.lang.Double"
  }
}

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

1 participant