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

Missing schema descriptions in prod #47

Open
petrus-jvrensburg opened this issue Apr 15, 2024 · 3 comments · May be fixed by #50
Open

Missing schema descriptions in prod #47

petrus-jvrensburg opened this issue Apr 15, 2024 · 3 comments · May be fixed by #50

Comments

@petrus-jvrensburg
Copy link
Contributor

When running in prod, I'm getting different results than when running in dev. After digging, it seems that the @doc description from my schema is missing in prod.

E.g. in prod:

iex> Instructor.JSONSchema.from_ecto_schema(DSS.ProductSuggestion)
"{\"type\":\"object\",\"description\":\"\",\"title\":\"DSS.ProductSuggestion\",\"required\":[\"product_description\",\"product_name\",\"relative_description\"],\"properties\":{\"product_description\":{\"type\":\"string\",\"title\":\"product_description\"},\"product_name\":{\"type\":\"string\",\"title\":\"product_name\"},\"relative_description\":{\"type\":\"string\",\"title\":\"relative_description\"}}}"

Notice that the description field is empty, which is not the case when calling the same function in dev.

@stevehodgkiss
Copy link
Contributor

Are you deploying with Mix releases? Releases strip out docs by default, but you can configure them to be kept with:

# mix.exs
def project do
  # ...
  releases: [
    myappname: [
      strip_beams: [keep: ["Docs"]]
    ]
  ]
end

@petrus-jvrensburg
Copy link
Contributor Author

Aah, yes I am. Didn't know about that option to keep the docs, thanks!

@petrus-jvrensburg petrus-jvrensburg linked a pull request Apr 22, 2024 that will close this issue
@rhcarvalho
Copy link

Related to #35.

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

Successfully merging a pull request may close this issue.

3 participants