The ADA prevents employers from asking about disability when deciding to offer you a job. They can ask you if you are able to safely perform certain tasks. If you cannot do a necessary task for the job, you can request a reasonable accommodation to allow you to perform the task. While there is some wiggle room for employers to discriminate and not get caught, generally they take it pretty seriously.
So if the job, such as cop or corrections officer, requires you to handle a weapon, respond to stress, be around crowds, whatever, your answers to being able to perform those tasks will depend highly on the symptoms of your PTSD. Lying about it will be a reason for termination, and obviously they will put you in those situations so they will find out if you can or cannot perform.
Disability letters for preference in employment only state the percentage, not what the condition(s) are. Your DD214 will only state that you had a disability discharge, not what the disabilities are.
If you are functioning in the military with your PTSD you would not get boarded for it. It would be a claim with the VA. If you are not functioning in the military with your PTSD, working as a cop or corrections officer is probably not a healthy plan. The stressors are too similar IMO.
Its not like PTSD is unknown to happen to cops. If you didn't have PTSD, becoming a cop is decently likely to help you develop it eventually. In my mind showing that you have it and are dealing with it successfully is a plus, not a negative. There is always a question of how people are going to deal with it the first times things hit the fan, I'd advertise the fact your response is a known quality. Its not really, each new stressor can bring new responses, so the nature and quality of your PTSD may change over time. Being self aware enough to seek treatment is however a Good Thing. The ones who try to ignore it, self medicate, or deny it are the bigger problem IMO.